diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/CHANGELOG.md b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/CHANGELOG.md index debcd7bec318..2b002a0476cb 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/CHANGELOG.md +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2022-03-15) +- Azure Resource Manager DevTestLabs client library for Java. This package contains Microsoft Azure SDK for DevTestLabs Management SDK. The DevTest Labs Client. Package tag package-2018-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-04-15) diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/README.md b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/README.md index 889ade30fe18..9f0b53d1b0b4 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/README.md +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-devtestlabs - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/devtestlabs/azure-resourcemanager-devtestlabs/SAMPLE.md) + + ## Troubleshooting ## Next steps diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/SAMPLE.md b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/SAMPLE.md new file mode 100644 index 000000000000..7ab9e84fe774 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/SAMPLE.md @@ -0,0 +1,4078 @@ +# Code snippets and samples + + +## ArmTemplates + +- [Get](#armtemplates_get) +- [List](#armtemplates_list) + +## ArtifactSources + +- [CreateOrUpdate](#artifactsources_createorupdate) +- [Delete](#artifactsources_delete) +- [Get](#artifactsources_get) +- [List](#artifactsources_list) +- [Update](#artifactsources_update) + +## Artifacts + +- [GenerateArmTemplate](#artifacts_generatearmtemplate) +- [Get](#artifacts_get) +- [List](#artifacts_list) + +## Costs + +- [CreateOrUpdate](#costs_createorupdate) +- [Get](#costs_get) + +## CustomImages + +- [CreateOrUpdate](#customimages_createorupdate) +- [Delete](#customimages_delete) +- [Get](#customimages_get) +- [List](#customimages_list) +- [Update](#customimages_update) + +## Disks + +- [Attach](#disks_attach) +- [CreateOrUpdate](#disks_createorupdate) +- [Delete](#disks_delete) +- [Detach](#disks_detach) +- [Get](#disks_get) +- [List](#disks_list) +- [Update](#disks_update) + +## Environments + +- [CreateOrUpdate](#environments_createorupdate) +- [Delete](#environments_delete) +- [Get](#environments_get) +- [List](#environments_list) +- [Update](#environments_update) + +## Formulas + +- [CreateOrUpdate](#formulas_createorupdate) +- [Delete](#formulas_delete) +- [Get](#formulas_get) +- [List](#formulas_list) +- [Update](#formulas_update) + +## GalleryImages + +- [List](#galleryimages_list) + +## GlobalSchedules + +- [CreateOrUpdate](#globalschedules_createorupdate) +- [Delete](#globalschedules_delete) +- [Execute](#globalschedules_execute) +- [GetByResourceGroup](#globalschedules_getbyresourcegroup) +- [List](#globalschedules_list) +- [ListByResourceGroup](#globalschedules_listbyresourcegroup) +- [Retarget](#globalschedules_retarget) +- [Update](#globalschedules_update) + +## Labs + +- [ClaimAnyVm](#labs_claimanyvm) +- [CreateEnvironment](#labs_createenvironment) +- [CreateOrUpdate](#labs_createorupdate) +- [Delete](#labs_delete) +- [ExportResourceUsage](#labs_exportresourceusage) +- [GenerateUploadUri](#labs_generateuploaduri) +- [GetByResourceGroup](#labs_getbyresourcegroup) +- [ImportVirtualMachine](#labs_importvirtualmachine) +- [List](#labs_list) +- [ListByResourceGroup](#labs_listbyresourcegroup) +- [ListVhds](#labs_listvhds) +- [Update](#labs_update) + +## NotificationChannels + +- [CreateOrUpdate](#notificationchannels_createorupdate) +- [Delete](#notificationchannels_delete) +- [Get](#notificationchannels_get) +- [List](#notificationchannels_list) +- [Notify](#notificationchannels_notify) +- [Update](#notificationchannels_update) + +## Operations + +- [Get](#operations_get) + +## Policies + +- [CreateOrUpdate](#policies_createorupdate) +- [Delete](#policies_delete) +- [Get](#policies_get) +- [List](#policies_list) +- [Update](#policies_update) + +## PolicySets + +- [EvaluatePolicies](#policysets_evaluatepolicies) + +## ProviderOperations + +- [List](#provideroperations_list) + +## Schedules + +- [CreateOrUpdate](#schedules_createorupdate) +- [Delete](#schedules_delete) +- [Execute](#schedules_execute) +- [Get](#schedules_get) +- [List](#schedules_list) +- [ListApplicable](#schedules_listapplicable) +- [Update](#schedules_update) + +## Secrets + +- [CreateOrUpdate](#secrets_createorupdate) +- [Delete](#secrets_delete) +- [Get](#secrets_get) +- [List](#secrets_list) +- [Update](#secrets_update) + +## ServiceFabricSchedules + +- [CreateOrUpdate](#servicefabricschedules_createorupdate) +- [Delete](#servicefabricschedules_delete) +- [Execute](#servicefabricschedules_execute) +- [Get](#servicefabricschedules_get) +- [List](#servicefabricschedules_list) +- [Update](#servicefabricschedules_update) + +## ServiceFabrics + +- [CreateOrUpdate](#servicefabrics_createorupdate) +- [Delete](#servicefabrics_delete) +- [Get](#servicefabrics_get) +- [List](#servicefabrics_list) +- [ListApplicableSchedules](#servicefabrics_listapplicableschedules) +- [Start](#servicefabrics_start) +- [Stop](#servicefabrics_stop) +- [Update](#servicefabrics_update) + +## ServiceRunners + +- [CreateOrUpdate](#servicerunners_createorupdate) +- [Delete](#servicerunners_delete) +- [Get](#servicerunners_get) + +## Users + +- [CreateOrUpdate](#users_createorupdate) +- [Delete](#users_delete) +- [Get](#users_get) +- [List](#users_list) +- [Update](#users_update) + +## VirtualMachineSchedules + +- [CreateOrUpdate](#virtualmachineschedules_createorupdate) +- [Delete](#virtualmachineschedules_delete) +- [Execute](#virtualmachineschedules_execute) +- [Get](#virtualmachineschedules_get) +- [List](#virtualmachineschedules_list) +- [Update](#virtualmachineschedules_update) + +## VirtualMachines + +- [AddDataDisk](#virtualmachines_adddatadisk) +- [ApplyArtifacts](#virtualmachines_applyartifacts) +- [Claim](#virtualmachines_claim) +- [CreateOrUpdate](#virtualmachines_createorupdate) +- [Delete](#virtualmachines_delete) +- [DetachDataDisk](#virtualmachines_detachdatadisk) +- [Get](#virtualmachines_get) +- [GetRdpFileContents](#virtualmachines_getrdpfilecontents) +- [List](#virtualmachines_list) +- [ListApplicableSchedules](#virtualmachines_listapplicableschedules) +- [Redeploy](#virtualmachines_redeploy) +- [Resize](#virtualmachines_resize) +- [Restart](#virtualmachines_restart) +- [Start](#virtualmachines_start) +- [Stop](#virtualmachines_stop) +- [TransferDisks](#virtualmachines_transferdisks) +- [UnClaim](#virtualmachines_unclaim) +- [Update](#virtualmachines_update) + +## VirtualNetworks + +- [CreateOrUpdate](#virtualnetworks_createorupdate) +- [Delete](#virtualnetworks_delete) +- [Get](#virtualnetworks_get) +- [List](#virtualnetworks_list) +- [Update](#virtualnetworks_update) +### ArmTemplates_Get + +```java +import com.azure.core.util.Context; + +/** Samples for ArmTemplates Get. */ +public final class ArmTemplatesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArmTemplates_Get.json + */ + /** + * Sample code: ArmTemplates_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void armTemplatesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .armTemplates() + .getWithResponse( + "resourceGroupName", "{labName}", "{artifactSourceName}", "{armTemplateName}", null, Context.NONE); + } +} +``` + +### ArmTemplates_List + +```java +import com.azure.core.util.Context; + +/** Samples for ArmTemplates List. */ +public final class ArmTemplatesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArmTemplates_List.json + */ + /** + * Sample code: ArmTemplates_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void armTemplatesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .armTemplates() + .list("resourceGroupName", "{labName}", "{artifactSourceName}", null, null, null, null, Context.NONE); + } +} +``` + +### ArtifactSources_CreateOrUpdate + +```java +import com.azure.resourcemanager.devtestlabs.models.EnableStatus; +import com.azure.resourcemanager.devtestlabs.models.SourceControlType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ArtifactSources CreateOrUpdate. */ +public final class ArtifactSourcesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_CreateOrUpdate.json + */ + /** + * Sample code: ArtifactSources_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactSourcesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .artifactSources() + .define("{artifactSourceName}") + .withRegion((String) null) + .withExistingLab("resourceGroupName", "{labName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withDisplayName("{displayName}") + .withUri("{artifactSourceUri}") + .withSourceType(SourceControlType.fromString("{VsoGit|GitHub|StorageAccount}")) + .withFolderPath("{folderPath}") + .withArmTemplateFolderPath("{armTemplateFolderPath}") + .withBranchRef("{branchRef}") + .withSecurityToken("{securityToken}") + .withStatus(EnableStatus.fromString("{Enabled|Disabled}")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ArtifactSources_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ArtifactSources Delete. */ +public final class ArtifactSourcesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_Delete.json + */ + /** + * Sample code: ArtifactSources_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactSourcesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .artifactSources() + .deleteWithResponse("resourceGroupName", "{labName}", "{artifactSourceName}", Context.NONE); + } +} +``` + +### ArtifactSources_Get + +```java +import com.azure.core.util.Context; + +/** Samples for ArtifactSources Get. */ +public final class ArtifactSourcesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_Get.json + */ + /** + * Sample code: ArtifactSources_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactSourcesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .artifactSources() + .getWithResponse("resourceGroupName", "{labName}", "{artifactSourceName}", null, Context.NONE); + } +} +``` + +### ArtifactSources_List + +```java +import com.azure.core.util.Context; + +/** Samples for ArtifactSources List. */ +public final class ArtifactSourcesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_List.json + */ + /** + * Sample code: ArtifactSources_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactSourcesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.artifactSources().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} +``` + +### ArtifactSources_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ArtifactSource; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ArtifactSources Update. */ +public final class ArtifactSourcesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_Update.json + */ + /** + * Sample code: ArtifactSources_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactSourcesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + ArtifactSource resource = + manager + .artifactSources() + .getWithResponse("resourceGroupName", "{labName}", "{artifactSourceName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Artifacts_GenerateArmTemplate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.FileUploadOptions; +import com.azure.resourcemanager.devtestlabs.models.GenerateArmTemplateRequest; + +/** Samples for Artifacts GenerateArmTemplate. */ +public final class ArtifactsGenerateArmTemplateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Artifacts_GenerateArmTemplate.json + */ + /** + * Sample code: Artifacts_GenerateArmTemplate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactsGenerateArmTemplate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .artifacts() + .generateArmTemplateWithResponse( + "resourceGroupName", + "{labName}", + "{artifactSourceName}", + "{artifactName}", + new GenerateArmTemplateRequest() + .withVirtualMachineName("{vmName}") + .withLocation("{location}") + .withFileUploadOptions(FileUploadOptions.NONE), + Context.NONE); + } +} +``` + +### Artifacts_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Artifacts Get. */ +public final class ArtifactsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Artifacts_Get.json + */ + /** + * Sample code: Artifacts_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .artifacts() + .getWithResponse( + "resourceGroupName", "{labName}", "{artifactSourceName}", "{artifactName}", null, Context.NONE); + } +} +``` + +### Artifacts_List + +```java +import com.azure.core.util.Context; + +/** Samples for Artifacts List. */ +public final class ArtifactsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Artifacts_List.json + */ + /** + * Sample code: Artifacts_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .artifacts() + .list("resourceGroupName", "{labName}", "{artifactSourceName}", null, null, null, null, Context.NONE); + } +} +``` + +### Costs_CreateOrUpdate + +```java +import com.azure.resourcemanager.devtestlabs.models.CostThresholdProperties; +import com.azure.resourcemanager.devtestlabs.models.CostThresholdStatus; +import com.azure.resourcemanager.devtestlabs.models.PercentageCostThresholdProperties; +import com.azure.resourcemanager.devtestlabs.models.ReportingCycleType; +import com.azure.resourcemanager.devtestlabs.models.TargetCostProperties; +import com.azure.resourcemanager.devtestlabs.models.TargetCostStatus; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** Samples for Costs CreateOrUpdate. */ +public final class CostsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Costs_CreateOrUpdate.json + */ + /** + * Sample code: Costs_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void costsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .costs() + .define("targetCost") + .withRegion((String) null) + .withExistingLab("resourceGroupName", "{labName}") + .withTargetCost( + new TargetCostProperties() + .withStatus(TargetCostStatus.ENABLED) + .withTarget(100) + .withCostThresholds( + Arrays + .asList( + new CostThresholdProperties() + .withThresholdId("00000000-0000-0000-0000-000000000001") + .withPercentageThreshold( + new PercentageCostThresholdProperties().withThresholdValue(25.0)) + .withDisplayOnChart(CostThresholdStatus.DISABLED) + .withSendNotificationWhenExceeded(CostThresholdStatus.DISABLED), + new CostThresholdProperties() + .withThresholdId("00000000-0000-0000-0000-000000000002") + .withPercentageThreshold( + new PercentageCostThresholdProperties().withThresholdValue(50.0)) + .withDisplayOnChart(CostThresholdStatus.ENABLED) + .withSendNotificationWhenExceeded(CostThresholdStatus.ENABLED), + new CostThresholdProperties() + .withThresholdId("00000000-0000-0000-0000-000000000003") + .withPercentageThreshold( + new PercentageCostThresholdProperties().withThresholdValue(75.0)) + .withDisplayOnChart(CostThresholdStatus.DISABLED) + .withSendNotificationWhenExceeded(CostThresholdStatus.DISABLED), + new CostThresholdProperties() + .withThresholdId("00000000-0000-0000-0000-000000000004") + .withPercentageThreshold( + new PercentageCostThresholdProperties().withThresholdValue(100.0)) + .withDisplayOnChart(CostThresholdStatus.DISABLED) + .withSendNotificationWhenExceeded(CostThresholdStatus.DISABLED), + new CostThresholdProperties() + .withThresholdId("00000000-0000-0000-0000-000000000005") + .withPercentageThreshold( + new PercentageCostThresholdProperties().withThresholdValue(125.0)) + .withDisplayOnChart(CostThresholdStatus.DISABLED) + .withSendNotificationWhenExceeded(CostThresholdStatus.DISABLED))) + .withCycleStartDateTime(OffsetDateTime.parse("2020-12-01T00:00:00.000Z")) + .withCycleEndDateTime(OffsetDateTime.parse("2020-12-31T00:00:00.000Z")) + .withCycleType(ReportingCycleType.CALENDAR_MONTH)) + .withCurrencyCode("USD") + .withStartDateTime(OffsetDateTime.parse("2020-12-01T00:00:00Z")) + .withEndDateTime(OffsetDateTime.parse("2020-12-31T23:59:59Z")) + .create(); + } +} +``` + +### Costs_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Costs Get. */ +public final class CostsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Costs_Get.json + */ + /** + * Sample code: Costs_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void costsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.costs().getWithResponse("resourceGroupName", "{labName}", "targetCost", null, Context.NONE); + } +} +``` + +### CustomImages_CreateOrUpdate + +```java +import com.azure.resourcemanager.devtestlabs.models.CustomImagePropertiesFromVm; +import com.azure.resourcemanager.devtestlabs.models.LinuxOsInfo; +import com.azure.resourcemanager.devtestlabs.models.LinuxOsState; +import java.util.HashMap; +import java.util.Map; + +/** Samples for CustomImages CreateOrUpdate. */ +public final class CustomImagesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_CreateOrUpdate.json + */ + /** + * Sample code: CustomImages_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void customImagesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .customImages() + .define("{customImageName}") + .withRegion((String) null) + .withExistingLab("resourceGroupName", "{labName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withVm( + new CustomImagePropertiesFromVm() + .withSourceVmId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}") + .withLinuxOsInfo(new LinuxOsInfo().withLinuxOsState(LinuxOsState.NON_DEPROVISIONED))) + .withDescription("My Custom Image") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### CustomImages_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for CustomImages Delete. */ +public final class CustomImagesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_Delete.json + */ + /** + * Sample code: CustomImages_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void customImagesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.customImages().delete("resourceGroupName", "{labName}", "{customImageName}", Context.NONE); + } +} +``` + +### CustomImages_Get + +```java +import com.azure.core.util.Context; + +/** Samples for CustomImages Get. */ +public final class CustomImagesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_Get.json + */ + /** + * Sample code: CustomImages_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void customImagesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .customImages() + .getWithResponse("resourceGroupName", "{labName}", "{customImageName}", null, Context.NONE); + } +} +``` + +### CustomImages_List + +```java +import com.azure.core.util.Context; + +/** Samples for CustomImages List. */ +public final class CustomImagesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_List.json + */ + /** + * Sample code: CustomImages_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void customImagesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.customImages().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} +``` + +### CustomImages_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.CustomImage; +import java.util.HashMap; +import java.util.Map; + +/** Samples for CustomImages Update. */ +public final class CustomImagesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_Update.json + */ + /** + * Sample code: CustomImages_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void customImagesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + CustomImage resource = + manager + .customImages() + .getWithResponse("resourceGroupName", "{labName}", "{customImageName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue2")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Disks_Attach + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.AttachDiskProperties; + +/** Samples for Disks Attach. */ +public final class DisksAttachSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Attach.json + */ + /** + * Sample code: Disks_Attach. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksAttach(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .disks() + .attach( + "resourceGroupName", + "{labName}", + "{userId}", + "{diskName}", + new AttachDiskProperties() + .withLeasedByLabVmId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}"), + Context.NONE); + } +} +``` + +### Disks_CreateOrUpdate + +```java +import com.azure.resourcemanager.devtestlabs.models.StorageType; + +/** Samples for Disks CreateOrUpdate. */ +public final class DisksCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_CreateOrUpdate.json + */ + /** + * Sample code: Disks_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .disks() + .define("{diskName}") + .withRegion((String) null) + .withExistingUser("resourceGroupName", "{labName}", "{userId}") + .withDiskType(StorageType.STANDARD) + .withDiskSizeGiB(1023) + .withLeasedByLabVmId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/vmName") + .create(); + } +} +``` + +### Disks_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Disks Delete. */ +public final class DisksDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Delete.json + */ + /** + * Sample code: Disks_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.disks().delete("resourceGroupName", "{labName}", "{userId}", "{diskName}", Context.NONE); + } +} +``` + +### Disks_Detach + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.DetachDiskProperties; + +/** Samples for Disks Detach. */ +public final class DisksDetachSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Detach.json + */ + /** + * Sample code: Disks_Detach. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksDetach(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .disks() + .detach( + "resourceGroupName", + "{labName}", + "{userId}", + "{diskName}", + new DetachDiskProperties() + .withLeasedByLabVmId( + "/subscriptions/{subscriptionId}/resourcegroups/myResourceGroup/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}"), + Context.NONE); + } +} +``` + +### Disks_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Disks Get. */ +public final class DisksGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Get.json + */ + /** + * Sample code: Disks_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.disks().getWithResponse("resourceGroupName", "{labName}", "@me", "{diskName}", null, Context.NONE); + } +} +``` + +### Disks_List + +```java +import com.azure.core.util.Context; + +/** Samples for Disks List. */ +public final class DisksListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_List.json + */ + /** + * Sample code: Disks_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.disks().list("resourceGroupName", "{labName}", "@me", null, null, null, null, Context.NONE); + } +} +``` + +### Disks_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.Disk; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Disks Update. */ +public final class DisksUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Update.json + */ + /** + * Sample code: Disks_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + Disk resource = + manager + .disks() + .getWithResponse("resourceGroupName", "{labName}", "@me", "diskName", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Environments_CreateOrUpdate + +```java +import com.azure.resourcemanager.devtestlabs.models.EnvironmentDeploymentProperties; +import java.util.Arrays; + +/** Samples for Environments CreateOrUpdate. */ +public final class EnvironmentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_CreateOrUpdate.json + */ + /** + * Sample code: Environments_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void environmentsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .environments() + .define("{environmentName}") + .withRegion((String) null) + .withExistingUser("resourceGroupName", "{labName}", "@me") + .withDeploymentProperties( + new EnvironmentDeploymentProperties() + .withArmTemplateId( + "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}") + .withParameters(Arrays.asList())) + .create(); + } +} +``` + +### Environments_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Environments Delete. */ +public final class EnvironmentsDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_Delete.json + */ + /** + * Sample code: Environments_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void environmentsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.environments().delete("resourceGroupName", "{labName}", "@me", "{environmentName}", Context.NONE); + } +} +``` + +### Environments_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Environments Get. */ +public final class EnvironmentsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_Get.json + */ + /** + * Sample code: Environments_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void environmentsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .environments() + .getWithResponse("resourceGroupName", "{labName}", "@me", "{environmentName}", null, Context.NONE); + } +} +``` + +### Environments_List + +```java +import com.azure.core.util.Context; + +/** Samples for Environments List. */ +public final class EnvironmentsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_List.json + */ + /** + * Sample code: Environments_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void environmentsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.environments().list("resourceGroupName", "{labName}", "@me", null, null, null, null, Context.NONE); + } +} +``` + +### Environments_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.DtlEnvironment; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Environments Update. */ +public final class EnvironmentsUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_Update.json + */ + /** + * Sample code: Environments_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void environmentsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + DtlEnvironment resource = + manager + .environments() + .getWithResponse("resourceGroupName", "{labName}", "@me", "{environmentName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Formulas_CreateOrUpdate + +```java +import com.azure.resourcemanager.devtestlabs.models.ArtifactInstallProperties; +import com.azure.resourcemanager.devtestlabs.models.GalleryImageReference; +import com.azure.resourcemanager.devtestlabs.models.InboundNatRule; +import com.azure.resourcemanager.devtestlabs.models.LabVirtualMachineCreationParameter; +import com.azure.resourcemanager.devtestlabs.models.NetworkInterfaceProperties; +import com.azure.resourcemanager.devtestlabs.models.SharedPublicIpAddressConfiguration; +import com.azure.resourcemanager.devtestlabs.models.TransportProtocol; +import java.util.Arrays; + +/** Samples for Formulas CreateOrUpdate. */ +public final class FormulasCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_CreateOrUpdate.json + */ + /** + * Sample code: Formulas_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void formulasCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .formulas() + .define("{formulaName}") + .withRegion("{location}") + .withExistingLab("resourceGroupName", "{labName}") + .withDescription("Formula using a Linux base") + .withFormulaContent( + new LabVirtualMachineCreationParameter() + .withLocation("{location}") + .withNotes("Ubuntu Server 20.10") + .withSize("Standard_B1ms") + .withUsername("user") + .withIsAuthenticationWithSshKey(false) + .withLabSubnetName("Dtl{labName}Subnet") + .withLabVirtualNetworkId("/virtualnetworks/dtl{labName}") + .withDisallowPublicIpAddress(true) + .withArtifacts( + Arrays + .asList( + new ArtifactInstallProperties() + .withArtifactId( + "/artifactsources/{artifactSourceName}/artifacts/linux-install-nodejs") + .withParameters(Arrays.asList()))) + .withGalleryImageReference( + new GalleryImageReference() + .withOffer("0001-com-ubuntu-server-groovy") + .withPublisher("canonical") + .withSku("20_10") + .withOsType("Linux") + .withVersion("latest")) + .withNetworkInterface( + new NetworkInterfaceProperties() + .withSharedPublicIpAddressConfiguration( + new SharedPublicIpAddressConfiguration() + .withInboundNatRules( + Arrays + .asList( + new InboundNatRule() + .withTransportProtocol(TransportProtocol.TCP) + .withBackendPort(22))))) + .withAllowClaim(false) + .withStorageType("Standard")) + .create(); + } +} +``` + +### Formulas_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Formulas Delete. */ +public final class FormulasDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_Delete.json + */ + /** + * Sample code: Formulas_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void formulasDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.formulas().deleteWithResponse("resourceGroupName", "{labName}", "{formulaName}", Context.NONE); + } +} +``` + +### Formulas_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Formulas Get. */ +public final class FormulasGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_Get.json + */ + /** + * Sample code: Formulas_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void formulasGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.formulas().getWithResponse("resourceGroupName", "{labName}", "{formulaName}", null, Context.NONE); + } +} +``` + +### Formulas_List + +```java +import com.azure.core.util.Context; + +/** Samples for Formulas List. */ +public final class FormulasListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_List.json + */ + /** + * Sample code: Formulas_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void formulasList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.formulas().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} +``` + +### Formulas_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.Formula; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Formulas Update. */ +public final class FormulasUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_Update.json + */ + /** + * Sample code: Formulas_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void formulasUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + Formula resource = + manager + .formulas() + .getWithResponse("resourceGroupName", "{labName}", "{formulaName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### GalleryImages_List + +```java +import com.azure.core.util.Context; + +/** Samples for GalleryImages List. */ +public final class GalleryImagesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GalleryImages_List.json + */ + /** + * Sample code: GalleryImages_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void galleryImagesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.galleryImages().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} +``` + +### GlobalSchedules_CreateOrUpdate + +```java +import com.azure.resourcemanager.devtestlabs.models.EnableStatus; +import com.azure.resourcemanager.devtestlabs.models.WeekDetails; +import java.util.Arrays; + +/** Samples for GlobalSchedules CreateOrUpdate. */ +public final class GlobalSchedulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_CreateOrUpdate.json + */ + /** + * Sample code: GlobalSchedules_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .globalSchedules() + .define("labvmautostart") + .withRegion((String) null) + .withExistingResourceGroup("resourceGroupName") + .withStatus(EnableStatus.ENABLED) + .withTaskType("LabVmsStartupTask") + .withWeeklyRecurrence( + new WeekDetails() + .withWeekdays(Arrays.asList("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")) + .withTime("0700")) + .withTimeZoneId("Hawaiian Standard Time") + .create(); + } +} +``` + +### GlobalSchedules_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for GlobalSchedules Delete. */ +public final class GlobalSchedulesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Delete.json + */ + /** + * Sample code: GlobalSchedules_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.globalSchedules().deleteWithResponse("resourceGroupName", "labvmautostart", Context.NONE); + } +} +``` + +### GlobalSchedules_Execute + +```java +import com.azure.core.util.Context; + +/** Samples for GlobalSchedules Execute. */ +public final class GlobalSchedulesExecuteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Execute.json + */ + /** + * Sample code: GlobalSchedules_Execute. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesExecute(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.globalSchedules().execute("resourceGroupName", "labvmautostart", Context.NONE); + } +} +``` + +### GlobalSchedules_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for GlobalSchedules GetByResourceGroup. */ +public final class GlobalSchedulesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Get.json + */ + /** + * Sample code: GlobalSchedules_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .globalSchedules() + .getByResourceGroupWithResponse("resourceGroupName", "labvmautostart", null, Context.NONE); + } +} +``` + +### GlobalSchedules_List + +```java +import com.azure.core.util.Context; + +/** Samples for GlobalSchedules List. */ +public final class GlobalSchedulesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_ListBySubscription.json + */ + /** + * Sample code: GlobalSchedules_ListBySubscription. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesListBySubscription( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.globalSchedules().list(null, null, null, null, Context.NONE); + } +} +``` + +### GlobalSchedules_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for GlobalSchedules ListByResourceGroup. */ +public final class GlobalSchedulesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_ListByResourceGroup.json + */ + /** + * Sample code: GlobalSchedules_ListByResourceGroup. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesListByResourceGroup( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.globalSchedules().listByResourceGroup("resourceGroupName", null, null, null, null, Context.NONE); + } +} +``` + +### GlobalSchedules_Retarget + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.RetargetScheduleProperties; + +/** Samples for GlobalSchedules Retarget. */ +public final class GlobalSchedulesRetargetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Retarget.json + */ + /** + * Sample code: GlobalSchedules_Retarget. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesRetarget(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .globalSchedules() + .retarget( + "resourceGroupName", + "{scheduleName}", + new RetargetScheduleProperties() + .withCurrentResourceId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{targetLab}") + .withTargetResourceId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{currentLab}"), + Context.NONE); + } +} +``` + +### GlobalSchedules_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.Schedule; +import java.util.HashMap; +import java.util.Map; + +/** Samples for GlobalSchedules Update. */ +public final class GlobalSchedulesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Update.json + */ + /** + * Sample code: GlobalSchedules_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + Schedule resource = + manager + .globalSchedules() + .getByResourceGroupWithResponse("resourceGroupName", "labvmautostart", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Labs_ClaimAnyVm + +```java +import com.azure.core.util.Context; + +/** Samples for Labs ClaimAnyVm. */ +public final class LabsClaimAnyVmSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ClaimAnyVm.json + */ + /** + * Sample code: Labs_ClaimAnyVm. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsClaimAnyVm(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.labs().claimAnyVm("resourceGroupName", "{labName}", Context.NONE); + } +} +``` + +### Labs_CreateEnvironment + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.GalleryImageReference; +import com.azure.resourcemanager.devtestlabs.models.LabVirtualMachineCreationParameter; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Labs CreateEnvironment. */ +public final class LabsCreateEnvironmentSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_CreateEnvironment.json + */ + /** + * Sample code: Labs_CreateEnvironment. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsCreateEnvironment(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .labs() + .createEnvironment( + "resourceGroupName", + "{labName}", + new LabVirtualMachineCreationParameter() + .withName("{vmName}") + .withLocation("{location}") + .withTags(mapOf("tagName1", "tagValue1")) + .withSize("Standard_A2_v2") + .withUsername("{userName}") + .withPassword("{userPassword}") + .withLabSubnetName("{virtualnetwork-subnet-name}") + .withLabVirtualNetworkId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}") + .withDisallowPublicIpAddress(true) + .withGalleryImageReference( + new GalleryImageReference() + .withOffer("UbuntuServer") + .withPublisher("Canonical") + .withSku("16.04-LTS") + .withOsType("Linux") + .withVersion("Latest")) + .withAllowClaim(true) + .withStorageType("Standard"), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Labs_CreateOrUpdate + +```java +import com.azure.resourcemanager.devtestlabs.models.StorageType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Labs CreateOrUpdate. */ +public final class LabsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_CreateOrUpdate.json + */ + /** + * Sample code: Labs_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .labs() + .define("{labName}") + .withRegion("{location}") + .withExistingResourceGroup("resourceGroupName") + .withTags(mapOf("tagName1", "tagValue1")) + .withLabStorageType(StorageType.fromString("{Standard|Premium}")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Labs_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Labs Delete. */ +public final class LabsDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_Delete.json + */ + /** + * Sample code: Labs_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.labs().delete("resourceGroupName", "{labName}", Context.NONE); + } +} +``` + +### Labs_ExportResourceUsage + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ExportResourceUsageParameters; +import java.time.OffsetDateTime; + +/** Samples for Labs ExportResourceUsage. */ +public final class LabsExportResourceUsageSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ExportResourceUsage.json + */ + /** + * Sample code: Labs_ExportResourceUsage. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsExportResourceUsage(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .labs() + .exportResourceUsage( + "resourceGroupName", + "{labName}", + new ExportResourceUsageParameters() + .withBlobStorageAbsoluteSasUri( + "https://invalid.blob.core.windows.net/export.blob?sv=2015-07-08&sig={sas}&sp=rcw") + .withUsageStartDate(OffsetDateTime.parse("2020-12-01T00:00:00Z")), + Context.NONE); + } +} +``` + +### Labs_GenerateUploadUri + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.GenerateUploadUriParameter; + +/** Samples for Labs GenerateUploadUri. */ +public final class LabsGenerateUploadUriSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_GenerateUploadUri.json + */ + /** + * Sample code: Labs_GenerateUploadUri. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsGenerateUploadUri(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .labs() + .generateUploadUriWithResponse( + "resourceGroupName", + "{labName}", + new GenerateUploadUriParameter().withBlobName("{blob-name}"), + Context.NONE); + } +} +``` + +### Labs_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Labs GetByResourceGroup. */ +public final class LabsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_Get.json + */ + /** + * Sample code: Labs_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.labs().getByResourceGroupWithResponse("resourceGroupName", "{labName}", null, Context.NONE); + } +} +``` + +### Labs_ImportVirtualMachine + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ImportLabVirtualMachineRequest; + +/** Samples for Labs ImportVirtualMachine. */ +public final class LabsImportVirtualMachineSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ImportVirtualMachine.json + */ + /** + * Sample code: Labs_ImportVirtualMachine. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsImportVirtualMachine(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .labs() + .importVirtualMachine( + "resourceGroupName", + "{labName}", + new ImportLabVirtualMachineRequest() + .withSourceVirtualMachineResourceId( + "/subscriptions/{subscriptionId}/resourceGroups/{otherResourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") + .withDestinationVirtualMachineName("{vmName}"), + Context.NONE); + } +} +``` + +### Labs_List + +```java +import com.azure.core.util.Context; + +/** Samples for Labs List. */ +public final class LabsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ListBySubscription.json + */ + /** + * Sample code: Labs_ListBySubscription. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsListBySubscription(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.labs().list(null, null, null, null, Context.NONE); + } +} +``` + +### Labs_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Labs ListByResourceGroup. */ +public final class LabsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ListByResourceGroup.json + */ + /** + * Sample code: Labs_ListByResourceGroup. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsListByResourceGroup(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.labs().listByResourceGroup("resourceGroupName", null, null, null, null, Context.NONE); + } +} +``` + +### Labs_ListVhds + +```java +import com.azure.core.util.Context; + +/** Samples for Labs ListVhds. */ +public final class LabsListVhdsSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ListVhds.json + */ + /** + * Sample code: Labs_ListVhds. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsListVhds(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.labs().listVhds("resourceGroupName", "{labName}", Context.NONE); + } +} +``` + +### Labs_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.Lab; + +/** Samples for Labs Update. */ +public final class LabsUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_Update.json + */ + /** + * Sample code: Labs_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + Lab resource = + manager + .labs() + .getByResourceGroupWithResponse("resourceGroupName", "{labName}", null, Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### NotificationChannels_CreateOrUpdate + +```java +import com.azure.resourcemanager.devtestlabs.models.Event; +import com.azure.resourcemanager.devtestlabs.models.NotificationChannelEventType; +import java.util.Arrays; + +/** Samples for NotificationChannels CreateOrUpdate. */ +public final class NotificationChannelsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_CreateOrUpdate.json + */ + /** + * Sample code: NotificationChannels_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void notificationChannelsCreateOrUpdate( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .notificationChannels() + .define("{notificationChannelName}") + .withRegion((String) null) + .withExistingLab("resourceGroupName", "{labName}") + .withWebhookUrl("{webhookUrl}") + .withEmailRecipient("{email}") + .withNotificationLocale("en") + .withDescription("Integration configured for auto-shutdown") + .withEvents(Arrays.asList(new Event().withEventName(NotificationChannelEventType.AUTO_SHUTDOWN))) + .create(); + } +} +``` + +### NotificationChannels_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for NotificationChannels Delete. */ +public final class NotificationChannelsDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_Delete.json + */ + /** + * Sample code: NotificationChannels_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void notificationChannelsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .notificationChannels() + .deleteWithResponse("resourceGroupName", "{labName}", "{notificationChannelName}", Context.NONE); + } +} +``` + +### NotificationChannels_Get + +```java +import com.azure.core.util.Context; + +/** Samples for NotificationChannels Get. */ +public final class NotificationChannelsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_Get.json + */ + /** + * Sample code: NotificationChannels_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void notificationChannelsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .notificationChannels() + .getWithResponse("resourceGroupName", "{labName}", "{notificationChannelName}", null, Context.NONE); + } +} +``` + +### NotificationChannels_List + +```java +import com.azure.core.util.Context; + +/** Samples for NotificationChannels List. */ +public final class NotificationChannelsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_List.json + */ + /** + * Sample code: NotificationChannels_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void notificationChannelsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.notificationChannels().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} +``` + +### NotificationChannels_Notify + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.NotificationChannelEventType; +import com.azure.resourcemanager.devtestlabs.models.NotifyParameters; + +/** Samples for NotificationChannels Notify. */ +public final class NotificationChannelsNotifySamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_Notify.json + */ + /** + * Sample code: NotificationChannels_Notify. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void notificationChannelsNotify(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .notificationChannels() + .notifyWithResponse( + "resourceGroupName", + "{labName}", + "{notificationChannelName}", + new NotifyParameters() + .withEventName(NotificationChannelEventType.AUTO_SHUTDOWN) + .withJsonPayload( + "{\"eventType\":\"AutoShutdown\",\"subscriptionId\":\"{subscriptionId}\",\"resourceGroupName\":\"resourceGroupName\",\"labName\":\"{labName}\"}"), + Context.NONE); + } +} +``` + +### NotificationChannels_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.NotificationChannel; + +/** Samples for NotificationChannels Update. */ +public final class NotificationChannelsUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_Update.json + */ + /** + * Sample code: NotificationChannels_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void notificationChannelsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + NotificationChannel resource = + manager + .notificationChannels() + .getWithResponse("resourceGroupName", "{labName}", "{notificationChannelName}", null, Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### Operations_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Operations Get. */ +public final class OperationsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Operations_Get.json + */ + /** + * Sample code: Operations_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void operationsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.operations().getWithResponse("{locationName}", "{operationName}", Context.NONE); + } +} +``` + +### Policies_CreateOrUpdate + +```java +import com.azure.resourcemanager.devtestlabs.models.PolicyEvaluatorType; +import com.azure.resourcemanager.devtestlabs.models.PolicyFactName; +import com.azure.resourcemanager.devtestlabs.models.PolicyStatus; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Policies CreateOrUpdate. */ +public final class PoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_CreateOrUpdate.json + */ + /** + * Sample code: Policies_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void policiesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .policies() + .define("{policyName}") + .withRegion("{location}") + .withExistingPolicyset("resourceGroupName", "{labName}", "{policySetName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withDescription("{policyDescription}") + .withStatus(PolicyStatus.fromString("{policyStatus}")) + .withFactName(PolicyFactName.fromString("{policyFactName}")) + .withFactData("{policyFactData}") + .withThreshold("{policyThreshold}") + .withEvaluatorType(PolicyEvaluatorType.fromString("{policyEvaluatorType}")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Policies_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Policies Delete. */ +public final class PoliciesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_Delete.json + */ + /** + * Sample code: Policies_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void policiesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .policies() + .deleteWithResponse("resourceGroupName", "{labName}", "{policySetName}", "{policyName}", Context.NONE); + } +} +``` + +### Policies_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Policies Get. */ +public final class PoliciesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_Get.json + */ + /** + * Sample code: Policies_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void policiesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .policies() + .getWithResponse("resourceGroupName", "{labName}", "{policySetName}", "{policyName}", null, Context.NONE); + } +} +``` + +### Policies_List + +```java +import com.azure.core.util.Context; + +/** Samples for Policies List. */ +public final class PoliciesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_List.json + */ + /** + * Sample code: Policies_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void policiesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .policies() + .list("resourceGroupName", "{labName}", "{policySetName}", null, null, null, null, Context.NONE); + } +} +``` + +### Policies_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.Policy; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Policies Update. */ +public final class PoliciesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_Update.json + */ + /** + * Sample code: Policies_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void policiesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + Policy resource = + manager + .policies() + .getWithResponse( + "resourceGroupName", "{labName}", "{policySetName}", "{policyName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### PolicySets_EvaluatePolicies + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.EvaluatePoliciesProperties; +import com.azure.resourcemanager.devtestlabs.models.EvaluatePoliciesRequest; +import java.util.Arrays; + +/** Samples for PolicySets EvaluatePolicies. */ +public final class PolicySetsEvaluatePoliciesSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/PolicySets_EvaluatePolicies.json + */ + /** + * Sample code: PolicySets_EvaluatePolicies. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void policySetsEvaluatePolicies(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .policySets() + .evaluatePoliciesWithResponse( + "resourceGroupName", + "{labName}", + "{policySetName}", + new EvaluatePoliciesRequest() + .withPolicies( + Arrays + .asList(new EvaluatePoliciesProperties().withFactName("LabVmCount").withValueOffset("1"))), + Context.NONE); + } +} +``` + +### ProviderOperations_List + +```java +import com.azure.core.util.Context; + +/** Samples for ProviderOperations List. */ +public final class ProviderOperationsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ProviderOperations_List.json + */ + /** + * Sample code: ProviderOperations_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void providerOperationsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.providerOperations().list(Context.NONE); + } +} +``` + +### Schedules_CreateOrUpdate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.fluent.models.ScheduleInner; +import com.azure.resourcemanager.devtestlabs.models.DayDetails; +import com.azure.resourcemanager.devtestlabs.models.EnableStatus; +import com.azure.resourcemanager.devtestlabs.models.HourDetails; +import com.azure.resourcemanager.devtestlabs.models.NotificationSettings; +import com.azure.resourcemanager.devtestlabs.models.WeekDetails; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Schedules CreateOrUpdate. */ +public final class SchedulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_CreateOrUpdate.json + */ + /** + * Sample code: Schedules_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .schedules() + .createOrUpdateWithResponse( + "resourceGroupName", + "{labName}", + "{scheduleName}", + new ScheduleInner() + .withLocation("{location}") + .withTags(mapOf("tagName1", "tagValue1")) + .withStatus(EnableStatus.fromString("{Enabled|Disabled}")) + .withTaskType("{myLabVmTaskType}") + .withWeeklyRecurrence( + new WeekDetails() + .withWeekdays(Arrays.asList("Monday", "Wednesday", "Friday")) + .withTime("{timeOfTheDayTheScheduleWillOccurOnThoseDays}")) + .withDailyRecurrence(new DayDetails().withTime("{timeOfTheDayTheScheduleWillOccurEveryDay}")) + .withHourlyRecurrence(new HourDetails().withMinute(30)) + .withTimeZoneId("Pacific Standard Time") + .withNotificationSettings( + new NotificationSettings() + .withStatus(EnableStatus.fromString("{Enabled|Disabled}")) + .withTimeInMinutes(15) + .withWebhookUrl("{webhookUrl}") + .withEmailRecipient("{email}") + .withNotificationLocale("EN")) + .withTargetResourceId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}"), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Schedules_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Schedules Delete. */ +public final class SchedulesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_Delete.json + */ + /** + * Sample code: Schedules_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.schedules().deleteWithResponse("resourceGroupName", "{labName}", "{scheduleName}", Context.NONE); + } +} +``` + +### Schedules_Execute + +```java +import com.azure.core.util.Context; + +/** Samples for Schedules Execute. */ +public final class SchedulesExecuteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_Execute.json + */ + /** + * Sample code: Schedules_Execute. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesExecute(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.schedules().execute("resourceGroupName", "{labName}", "{scheduleName}", Context.NONE); + } +} +``` + +### Schedules_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Schedules Get. */ +public final class SchedulesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_Get.json + */ + /** + * Sample code: Schedules_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.schedules().getWithResponse("resourceGroupName", "{labName}", "{scheduleName}", null, Context.NONE); + } +} +``` + +### Schedules_List + +```java +import com.azure.core.util.Context; + +/** Samples for Schedules List. */ +public final class SchedulesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_List.json + */ + /** + * Sample code: Schedules_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.schedules().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} +``` + +### Schedules_ListApplicable + +```java +import com.azure.core.util.Context; + +/** Samples for Schedules ListApplicable. */ +public final class SchedulesListApplicableSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_ListApplicable.json + */ + /** + * Sample code: Schedules_ListApplicable. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesListApplicable(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.schedules().listApplicable("resourceGroupName", "{labName}", "{scheduleName}", Context.NONE); + } +} +``` + +### Schedules_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ScheduleFragment; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Schedules Update. */ +public final class SchedulesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_Update.json + */ + /** + * Sample code: Schedules_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .schedules() + .updateWithResponse( + "resourceGroupName", + "{labName}", + "{scheduleName}", + new ScheduleFragment().withTags(mapOf("tagName1", "tagValue1")), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Secrets_CreateOrUpdate + +```java +/** Samples for Secrets CreateOrUpdate. */ +public final class SecretsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_CreateOrUpdate.json + */ + /** + * Sample code: Secrets_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void secretsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .secrets() + .define("{secretName}") + .withRegion((String) null) + .withExistingUser("resourceGroupName", "{labName}", "{userName}") + .withValue("{secret}") + .create(); + } +} +``` + +### Secrets_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Secrets Delete. */ +public final class SecretsDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_Delete.json + */ + /** + * Sample code: Secrets_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void secretsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .secrets() + .deleteWithResponse("resourceGroupName", "{labName}", "{userName}", "{secretName}", Context.NONE); + } +} +``` + +### Secrets_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Secrets Get. */ +public final class SecretsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_Get.json + */ + /** + * Sample code: Secrets_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void secretsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .secrets() + .getWithResponse("resourceGroupName", "{labName}", "{userName}", "{secretName}", null, Context.NONE); + } +} +``` + +### Secrets_List + +```java +import com.azure.core.util.Context; + +/** Samples for Secrets List. */ +public final class SecretsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_List.json + */ + /** + * Sample code: Secrets_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void secretsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.secrets().list("resourceGroupName", "{labName}", "{userName}", null, null, null, null, Context.NONE); + } +} +``` + +### Secrets_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.Secret; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Secrets Update. */ +public final class SecretsUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_Update.json + */ + /** + * Sample code: Secrets_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void secretsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + Secret resource = + manager + .secrets() + .getWithResponse("resourceGroupName", "{labName}", "{userName}", "{secretName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ServiceFabricSchedules_CreateOrUpdate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.fluent.models.ScheduleInner; +import com.azure.resourcemanager.devtestlabs.models.DayDetails; +import com.azure.resourcemanager.devtestlabs.models.EnableStatus; +import com.azure.resourcemanager.devtestlabs.models.HourDetails; +import com.azure.resourcemanager.devtestlabs.models.NotificationSettings; +import com.azure.resourcemanager.devtestlabs.models.WeekDetails; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ServiceFabricSchedules CreateOrUpdate. */ +public final class ServiceFabricSchedulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_CreateOrUpdate.json + */ + /** + * Sample code: ServiceFabricSchedules_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricSchedulesCreateOrUpdate( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabricSchedules() + .createOrUpdateWithResponse( + "resourceGroupName", + "{labName}", + "@me", + "{serviceFrabicName}", + "{scheduleName}", + new ScheduleInner() + .withLocation("{location}") + .withTags(mapOf("tagName1", "tagValue1")) + .withStatus(EnableStatus.fromString("{Enabled|Disabled}")) + .withTaskType( + "{Unknown|LabVmsShutdownTask|LabVmsStartupTask|LabVmReclamationTask|ComputeVmShutdownTask}") + .withWeeklyRecurrence( + new WeekDetails() + .withWeekdays( + Arrays + .asList( + "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")) + .withTime("19:00")) + .withDailyRecurrence(new DayDetails().withTime("19:00")) + .withHourlyRecurrence(new HourDetails().withMinute(0)) + .withTimeZoneId("Pacific Standard Time") + .withNotificationSettings( + new NotificationSettings() + .withStatus(EnableStatus.fromString("{Enabled|Disabled}")) + .withTimeInMinutes(15) + .withWebhookUrl("{webhoolUrl}") + .withEmailRecipient("{email}") + .withNotificationLocale("EN")) + .withTargetResourceId( + "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/users/{uniqueIdentifier}/servicefabrics/{serviceFrabicName}"), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ServiceFabricSchedules_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ServiceFabricSchedules Delete. */ +public final class ServiceFabricSchedulesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_Delete.json + */ + /** + * Sample code: ServiceFabricSchedules_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricSchedulesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabricSchedules() + .deleteWithResponse( + "resourceGroupName", "{labName}", "@me", "{serviceFrabicName}", "{scheduleName}", Context.NONE); + } +} +``` + +### ServiceFabricSchedules_Execute + +```java +import com.azure.core.util.Context; + +/** Samples for ServiceFabricSchedules Execute. */ +public final class ServiceFabricSchedulesExecuteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_Execute.json + */ + /** + * Sample code: ServiceFabricSchedules_Execute. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricSchedulesExecute(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabricSchedules() + .execute("resourceGroupName", "{labName}", "@me", "{serviceFrabicName}", "{scheduleName}", Context.NONE); + } +} +``` + +### ServiceFabricSchedules_Get + +```java +import com.azure.core.util.Context; + +/** Samples for ServiceFabricSchedules Get. */ +public final class ServiceFabricSchedulesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_Get.json + */ + /** + * Sample code: ServiceFabricSchedules_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricSchedulesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabricSchedules() + .getWithResponse( + "resourceGroupName", "{labName}", "@me", "{serviceFrabicName}", "{scheduleName}", null, Context.NONE); + } +} +``` + +### ServiceFabricSchedules_List + +```java +import com.azure.core.util.Context; + +/** Samples for ServiceFabricSchedules List. */ +public final class ServiceFabricSchedulesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_List.json + */ + /** + * Sample code: ServiceFabricSchedules_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricSchedulesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabricSchedules() + .list("resourceGroupName", "{labName}", "@me", "{serviceFrabicName}", null, null, null, null, Context.NONE); + } +} +``` + +### ServiceFabricSchedules_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ScheduleFragment; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ServiceFabricSchedules Update. */ +public final class ServiceFabricSchedulesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_Update.json + */ + /** + * Sample code: ServiceFabricSchedules_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricSchedulesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabricSchedules() + .updateWithResponse( + "resourceGroupName", + "{labName}", + "@me", + "{serviceFrabicName}", + "{scheduleName}", + new ScheduleFragment().withTags(mapOf("tagName1", "tagValue1")), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ServiceFabrics_CreateOrUpdate + +```java +import java.util.HashMap; +import java.util.Map; + +/** Samples for ServiceFabrics CreateOrUpdate. */ +public final class ServiceFabricsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_CreateOrUpdate.json + */ + /** + * Sample code: ServiceFabrics_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .define("{serviceFabricName}") + .withRegion("{location}") + .withExistingUser("resourceGroupName", "{labName}", "{userName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withExternalServiceFabricId("{serviceFabricId}") + .withEnvironmentId("{environmentId}") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ServiceFabrics_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ServiceFabrics Delete. */ +public final class ServiceFabricsDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Delete.json + */ + /** + * Sample code: ServiceFabrics_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .delete("resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", Context.NONE); + } +} +``` + +### ServiceFabrics_Get + +```java +import com.azure.core.util.Context; + +/** Samples for ServiceFabrics Get. */ +public final class ServiceFabricsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Get.json + */ + /** + * Sample code: ServiceFabrics_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .getWithResponse("resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", null, Context.NONE); + } +} +``` + +### ServiceFabrics_List + +```java +import com.azure.core.util.Context; + +/** Samples for ServiceFabrics List. */ +public final class ServiceFabricsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_List.json + */ + /** + * Sample code: ServiceFabrics_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .list("resourceGroupName", "{labName}", "{userName}", null, null, null, null, Context.NONE); + } +} +``` + +### ServiceFabrics_ListApplicableSchedules + +```java +import com.azure.core.util.Context; + +/** Samples for ServiceFabrics ListApplicableSchedules. */ +public final class ServiceFabricsListApplicableSchedulesSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_ListApplicableSchedules.json + */ + /** + * Sample code: ServiceFabrics_ListApplicableSchedules. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsListApplicableSchedules( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .listApplicableSchedulesWithResponse( + "resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", Context.NONE); + } +} +``` + +### ServiceFabrics_Start + +```java +import com.azure.core.util.Context; + +/** Samples for ServiceFabrics Start. */ +public final class ServiceFabricsStartSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Start.json + */ + /** + * Sample code: ServiceFabrics_Start. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsStart(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .start("resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", Context.NONE); + } +} +``` + +### ServiceFabrics_Stop + +```java +import com.azure.core.util.Context; + +/** Samples for ServiceFabrics Stop. */ +public final class ServiceFabricsStopSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Stop.json + */ + /** + * Sample code: ServiceFabrics_Stop. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsStop(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .stop("resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", Context.NONE); + } +} +``` + +### ServiceFabrics_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ServiceFabric; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ServiceFabrics Update. */ +public final class ServiceFabricsUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Update.json + */ + /** + * Sample code: ServiceFabrics_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + ServiceFabric resource = + manager + .serviceFabrics() + .getWithResponse( + "resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ServiceRunners_CreateOrUpdate + +```java +import com.azure.resourcemanager.devtestlabs.models.IdentityProperties; +import com.azure.resourcemanager.devtestlabs.models.ManagedIdentityType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ServiceRunners CreateOrUpdate. */ +public final class ServiceRunnersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceRunners_CreateOrUpdate.json + */ + /** + * Sample code: ServiceRunners_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceRunnersCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceRunners() + .define("{servicerunnerName}") + .withRegion("{location}") + .withExistingLab("resourceGroupName", "{devtestlabName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withIdentity( + new IdentityProperties() + .withType(ManagedIdentityType.fromString("{identityType}")) + .withPrincipalId("{identityPrincipalId}") + .withTenantId("{identityTenantId}") + .withClientSecretUrl("{identityClientSecretUrl}")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ServiceRunners_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ServiceRunners Delete. */ +public final class ServiceRunnersDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceRunners_Delete.json + */ + /** + * Sample code: ServiceRunners_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceRunnersDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceRunners() + .deleteWithResponse("resourceGroupName", "{devtestlabName}", "{servicerunnerName}", Context.NONE); + } +} +``` + +### ServiceRunners_Get + +```java +import com.azure.core.util.Context; + +/** Samples for ServiceRunners Get. */ +public final class ServiceRunnersGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceRunners_Get.json + */ + /** + * Sample code: ServiceRunners_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceRunnersGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceRunners() + .getWithResponse("resourceGroupName", "{devtestlabName}", "{servicerunnerName}", Context.NONE); + } +} +``` + +### Users_CreateOrUpdate + +```java +import com.azure.resourcemanager.devtestlabs.models.UserIdentity; +import com.azure.resourcemanager.devtestlabs.models.UserSecretStore; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Users CreateOrUpdate. */ +public final class UsersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_CreateOrUpdate.json + */ + /** + * Sample code: Users_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void usersCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .users() + .define("{userName}") + .withRegion("{location}") + .withExistingLab("resourceGroupName", "{devtestlabName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withIdentity( + new UserIdentity() + .withPrincipalName("{principalName}") + .withPrincipalId("{principalId}") + .withTenantId("{tenantId}") + .withObjectId("{objectId}") + .withAppId("{appId}")) + .withSecretStore(new UserSecretStore().withKeyVaultUri("{keyVaultUri}").withKeyVaultId("{keyVaultId}")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Users_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Users Delete. */ +public final class UsersDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_Delete.json + */ + /** + * Sample code: Users_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void usersDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.users().delete("resourceGroupName", "{devtestlabName}", "{userName}", Context.NONE); + } +} +``` + +### Users_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Users Get. */ +public final class UsersGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_Get.json + */ + /** + * Sample code: Users_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void usersGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.users().getWithResponse("resourceGroupName", "{devtestlabName}", "{userName}", null, Context.NONE); + } +} +``` + +### Users_List + +```java +import com.azure.core.util.Context; + +/** Samples for Users List. */ +public final class UsersListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_List.json + */ + /** + * Sample code: Users_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void usersList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.users().list("resourceGroupName", "{devtestlabName}", null, null, null, null, Context.NONE); + } +} +``` + +### Users_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.User; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Users Update. */ +public final class UsersUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_Update.json + */ + /** + * Sample code: Users_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void usersUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + User resource = + manager + .users() + .getWithResponse("resourceGroupName", "{devtestlabName}", "{userName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### VirtualMachineSchedules_CreateOrUpdate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.fluent.models.ScheduleInner; +import com.azure.resourcemanager.devtestlabs.models.DayDetails; +import com.azure.resourcemanager.devtestlabs.models.EnableStatus; +import com.azure.resourcemanager.devtestlabs.models.HourDetails; +import com.azure.resourcemanager.devtestlabs.models.NotificationSettings; +import com.azure.resourcemanager.devtestlabs.models.WeekDetails; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for VirtualMachineSchedules CreateOrUpdate. */ +public final class VirtualMachineSchedulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_CreateOrUpdate.json + */ + /** + * Sample code: VirtualMachineSchedules_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachineSchedulesCreateOrUpdate( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachineSchedules() + .createOrUpdateWithResponse( + "resourceGroupName", + "{labName}", + "{vmName}", + "LabVmsShutdown", + new ScheduleInner() + .withLocation("{location}") + .withTags(mapOf("tagName1", "tagValue1")) + .withStatus(EnableStatus.ENABLED) + .withTaskType("LabVmsShutdownTask") + .withWeeklyRecurrence( + new WeekDetails().withWeekdays(Arrays.asList("Friday", "Saturday", "Sunday")).withTime("1700")) + .withDailyRecurrence(new DayDetails().withTime("1900")) + .withHourlyRecurrence(new HourDetails().withMinute(30)) + .withTimeZoneId("Pacific Standard Time") + .withNotificationSettings( + new NotificationSettings() + .withStatus(EnableStatus.ENABLED) + .withTimeInMinutes(30) + .withWebhookUrl("{webhookUrl}") + .withEmailRecipient("{email}") + .withNotificationLocale("EN")) + .withTargetResourceId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualMachines/{vmName}"), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### VirtualMachineSchedules_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachineSchedules Delete. */ +public final class VirtualMachineSchedulesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_Delete.json + */ + /** + * Sample code: VirtualMachineSchedules_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachineSchedulesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachineSchedules() + .deleteWithResponse("resourceGroupName", "{labName}", "{vmName}", "LabVmsShutdown", Context.NONE); + } +} +``` + +### VirtualMachineSchedules_Execute + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachineSchedules Execute. */ +public final class VirtualMachineSchedulesExecuteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_Execute.json + */ + /** + * Sample code: VirtualMachineSchedules_Execute. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachineSchedulesExecute( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachineSchedules() + .execute("resourceGroupName", "{labName}", "{vmName}", "LabVmsShutdown", Context.NONE); + } +} +``` + +### VirtualMachineSchedules_Get + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachineSchedules Get. */ +public final class VirtualMachineSchedulesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_Get.json + */ + /** + * Sample code: VirtualMachineSchedules_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachineSchedulesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachineSchedules() + .getWithResponse("resourceGroupName", "{labName}", "{vmName}", "LabVmsShutdown", null, Context.NONE); + } +} +``` + +### VirtualMachineSchedules_List + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachineSchedules List. */ +public final class VirtualMachineSchedulesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_List.json + */ + /** + * Sample code: VirtualMachineSchedules_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachineSchedulesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachineSchedules() + .list("resourceGroupName", "{labName}", "{vmName}", null, null, null, null, Context.NONE); + } +} +``` + +### VirtualMachineSchedules_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ScheduleFragment; +import java.util.HashMap; +import java.util.Map; + +/** Samples for VirtualMachineSchedules Update. */ +public final class VirtualMachineSchedulesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_Update.json + */ + /** + * Sample code: VirtualMachineSchedules_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachineSchedulesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachineSchedules() + .updateWithResponse( + "resourceGroupName", + "{labName}", + "{vmName}", + "LabVmsShutdown", + new ScheduleFragment().withTags(mapOf("tagName1", "tagValue1")), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### VirtualMachines_AddDataDisk + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.AttachNewDataDiskOptions; +import com.azure.resourcemanager.devtestlabs.models.DataDiskProperties; +import com.azure.resourcemanager.devtestlabs.models.StorageType; + +/** Samples for VirtualMachines AddDataDisk. */ +public final class VirtualMachinesAddDataDiskSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_AddDataDisk.json + */ + /** + * Sample code: VirtualMachines_AddDataDisk. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesAddDataDisk(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .addDataDisk( + "resourceGroupName", + "{labName}", + "{virtualMachineName}", + new DataDiskProperties() + .withAttachNewDataDiskOptions( + new AttachNewDataDiskOptions() + .withDiskSizeGiB(127) + .withDiskName("{diskName}") + .withDiskType(StorageType.fromString("{diskType}"))), + Context.NONE); + } +} +``` + +### VirtualMachines_ApplyArtifacts + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ApplyArtifactsRequest; +import com.azure.resourcemanager.devtestlabs.models.ArtifactInstallProperties; +import java.util.Arrays; + +/** Samples for VirtualMachines ApplyArtifacts. */ +public final class VirtualMachinesApplyArtifactsSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_ApplyArtifacts.json + */ + /** + * Sample code: VirtualMachines_ApplyArtifacts. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesApplyArtifacts(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .applyArtifacts( + "resourceGroupName", + "{labName}", + "{vmName}", + new ApplyArtifactsRequest() + .withArtifacts( + Arrays + .asList( + new ArtifactInstallProperties() + .withArtifactId( + "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/public" + + " repo/artifacts/windows-restart"))), + Context.NONE); + } +} +``` + +### VirtualMachines_Claim + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Claim. */ +public final class VirtualMachinesClaimSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Claim.json + */ + /** + * Sample code: VirtualMachines_Claim. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesClaim(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().claim("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} +``` + +### VirtualMachines_CreateOrUpdate + +```java +import com.azure.resourcemanager.devtestlabs.models.GalleryImageReference; +import java.util.HashMap; +import java.util.Map; + +/** Samples for VirtualMachines CreateOrUpdate. */ +public final class VirtualMachinesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_CreateOrUpdate.json + */ + /** + * Sample code: VirtualMachines_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .define("{vmName}") + .withRegion("{location}") + .withExistingLab("resourceGroupName", "{labName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withSize("Standard_A2_v2") + .withUsername("{userName}") + .withPassword("{userPassword}") + .withLabSubnetName("{virtualNetworkName}Subnet") + .withLabVirtualNetworkId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}") + .withDisallowPublicIpAddress(true) + .withGalleryImageReference( + new GalleryImageReference() + .withOffer("UbuntuServer") + .withPublisher("Canonical") + .withSku("16.04-LTS") + .withOsType("Linux") + .withVersion("Latest")) + .withAllowClaim(true) + .withStorageType("Standard") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### VirtualMachines_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Delete. */ +public final class VirtualMachinesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Delete.json + */ + /** + * Sample code: VirtualMachines_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().delete("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} +``` + +### VirtualMachines_DetachDataDisk + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.DetachDataDiskProperties; + +/** Samples for VirtualMachines DetachDataDisk. */ +public final class VirtualMachinesDetachDataDiskSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_DetachDataDisk.json + */ + /** + * Sample code: VirtualMachines_DetachDataDisk. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesDetachDataDisk(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .detachDataDisk( + "resourceGroupName", + "{labName}", + "{virtualMachineName}", + new DetachDataDiskProperties() + .withExistingLabDiskId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{virtualMachineName}"), + Context.NONE); + } +} +``` + +### VirtualMachines_Get + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Get. */ +public final class VirtualMachinesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Get.json + */ + /** + * Sample code: VirtualMachines_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().getWithResponse("resourceGroupName", "{labName}", "{vmName}", null, Context.NONE); + } +} +``` + +### VirtualMachines_GetRdpFileContents + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines GetRdpFileContents. */ +public final class VirtualMachinesGetRdpFileContentsSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_GetRdpFileContents.json + */ + /** + * Sample code: VirtualMachines_GetRdpFileContents. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesGetRdpFileContents( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .getRdpFileContentsWithResponse("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} +``` + +### VirtualMachines_List + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines List. */ +public final class VirtualMachinesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_List.json + */ + /** + * Sample code: VirtualMachines_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} +``` + +### VirtualMachines_ListApplicableSchedules + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines ListApplicableSchedules. */ +public final class VirtualMachinesListApplicableSchedulesSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_ListApplicableSchedules.json + */ + /** + * Sample code: VirtualMachines_ListApplicableSchedules. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesListApplicableSchedules( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .listApplicableSchedulesWithResponse("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} +``` + +### VirtualMachines_Redeploy + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Redeploy. */ +public final class VirtualMachinesRedeploySamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Redeploy.json + */ + /** + * Sample code: VirtualMachines_Redeploy. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesRedeploy(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().redeploy("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} +``` + +### VirtualMachines_Resize + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ResizeLabVirtualMachineProperties; + +/** Samples for VirtualMachines Resize. */ +public final class VirtualMachinesResizeSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Resize.json + */ + /** + * Sample code: VirtualMachines_Resize. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesResize(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .resize( + "resourceGroupName", + "{labName}", + "{vmName}", + new ResizeLabVirtualMachineProperties().withSize("Standard_A4_v2"), + Context.NONE); + } +} +``` + +### VirtualMachines_Restart + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Restart. */ +public final class VirtualMachinesRestartSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Restart.json + */ + /** + * Sample code: VirtualMachines_Restart. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesRestart(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().restart("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} +``` + +### VirtualMachines_Start + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Start. */ +public final class VirtualMachinesStartSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Start.json + */ + /** + * Sample code: VirtualMachines_Start. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesStart(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().start("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} +``` + +### VirtualMachines_Stop + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Stop. */ +public final class VirtualMachinesStopSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Stop.json + */ + /** + * Sample code: VirtualMachines_Stop. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesStop(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().stop("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} +``` + +### VirtualMachines_TransferDisks + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines TransferDisks. */ +public final class VirtualMachinesTransferDisksSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_TransferDisks.json + */ + /** + * Sample code: VirtualMachines_TransferDisks. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesTransferDisks(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().transferDisks("resourceGroupName", "{labName}", "{virtualmachineName}", Context.NONE); + } +} +``` + +### VirtualMachines_UnClaim + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines UnClaim. */ +public final class VirtualMachinesUnClaimSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_UnClaim.json + */ + /** + * Sample code: VirtualMachines_UnClaim. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesUnClaim(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().unClaim("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} +``` + +### VirtualMachines_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.LabVirtualMachine; + +/** Samples for VirtualMachines Update. */ +public final class VirtualMachinesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Update.json + */ + /** + * Sample code: VirtualMachines_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + LabVirtualMachine resource = + manager + .virtualMachines() + .getWithResponse("resourceGroupName", "{labName}", "{vmName}", null, Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### VirtualNetworks_CreateOrUpdate + +```java +import java.util.HashMap; +import java.util.Map; + +/** Samples for VirtualNetworks CreateOrUpdate. */ +public final class VirtualNetworksCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_CreateOrUpdate.json + */ + /** + * Sample code: VirtualNetworks_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualNetworksCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualNetworks() + .define("{virtualNetworkName}") + .withRegion("{location}") + .withExistingLab("resourceGroupName", "{labName}") + .withTags(mapOf("tagName1", "tagValue1")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### VirtualNetworks_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualNetworks Delete. */ +public final class VirtualNetworksDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_Delete.json + */ + /** + * Sample code: VirtualNetworks_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualNetworksDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualNetworks().delete("resourceGroupName", "{labName}", "{virtualNetworkName}", Context.NONE); + } +} +``` + +### VirtualNetworks_Get + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualNetworks Get. */ +public final class VirtualNetworksGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_Get.json + */ + /** + * Sample code: VirtualNetworks_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualNetworksGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualNetworks() + .getWithResponse("resourceGroupName", "{labName}", "{virtualNetworkName}", null, Context.NONE); + } +} +``` + +### VirtualNetworks_List + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualNetworks List. */ +public final class VirtualNetworksListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_List.json + */ + /** + * Sample code: VirtualNetworks_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualNetworksList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualNetworks().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} +``` + +### VirtualNetworks_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.VirtualNetwork; +import java.util.HashMap; +import java.util.Map; + +/** Samples for VirtualNetworks Update. */ +public final class VirtualNetworksUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_Update.json + */ + /** + * Sample code: VirtualNetworks_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualNetworksUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + VirtualNetwork resource = + manager + .virtualNetworks() + .getWithResponse("resourceGroupName", "{labName}", "{virtualNetworkName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml index df108ca15063..9c0a20af7f2d 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml @@ -1,55 +1,55 @@ - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + - com.azure.resourcemanager - azure-resourcemanager-devtestlabs - 1.0.0-beta.2 - jar + com.azure.resourcemanager + azure-resourcemanager-devtestlabs + 1.0.0-beta.2 + jar - Microsoft Azure SDK for DevTestLabs Management - This package contains Microsoft Azure SDK for DevTestLabs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The DevTest Labs Client. Package tag package-2018-09. - https://github.com/Azure/azure-sdk-for-java + Microsoft Azure SDK for DevTestLabs Management + This package contains Microsoft Azure SDK for DevTestLabs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The DevTest Labs Client. Package tag package-2018-09. + https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + - - https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - microsoft - Microsoft - - - - UTF-8 - true - - - - com.azure - azure-core - 1.26.0 - - - com.azure - azure-core-management - 1.5.3 - - + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + true + + + + com.azure + azure-core + 1.26.0 + + + com.azure + azure-core-management + 1.5.3 + + diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/DevTestLabsManager.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/DevTestLabsManager.java index 96929b98af39..ec45af8bed1f 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/DevTestLabsManager.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/DevTestLabsManager.java @@ -8,8 +8,8 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -17,6 +17,7 @@ import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -77,6 +78,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to DevTestLabsManager. The DevTest Labs Client. */ public final class DevTestLabsManager { @@ -168,11 +170,12 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; private Duration defaultPollInterval; @@ -212,6 +215,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { return this; } + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + /** * Sets the retry policy to the HTTP pipeline. * @@ -230,9 +244,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -268,20 +284,33 @@ public DevTestLabsManager authenticate(TokenCredential credential, AzureProfile userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArmTemplatesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArmTemplatesClient.java index 14fabcf6ad45..22fc910ac507 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArmTemplatesClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArmTemplatesClient.java @@ -22,7 +22,7 @@ public interface ArmTemplatesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName, String artifactSourceName); @@ -41,7 +41,7 @@ public interface ArmTemplatesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -81,7 +81,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure resource manager template. + * @return azure resource manager template along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactSourcesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactSourcesClient.java index c0dc5ca47d10..b75b1fb2e3aa 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactSourcesClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactSourcesClient.java @@ -22,7 +22,7 @@ public interface ArtifactSourcesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName); @@ -40,7 +40,7 @@ public interface ArtifactSourcesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -77,7 +77,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact source. + * @return artifact source along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -110,7 +110,7 @@ ArtifactSourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an artifact source. + * @return properties of an artifact source along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -139,7 +139,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context); @@ -171,7 +171,7 @@ ArtifactSourceInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an artifact source. + * @return properties of an artifact source along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactsClient.java index 84683b96e417..96e2597cb506 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactsClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactsClient.java @@ -24,7 +24,7 @@ public interface ArtifactsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName, String artifactSourceName); @@ -43,7 +43,7 @@ public interface ArtifactsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -83,7 +83,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact. + * @return artifact along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -129,7 +129,7 @@ ArmTemplateInfoInner generateArmTemplate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a generated ARM template. + * @return information about a generated ARM template along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response generateArmTemplateWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CostsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CostsClient.java index 08f46abf1cd6..76a0b3bb6de3 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CostsClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CostsClient.java @@ -37,7 +37,7 @@ public interface CostsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cost. + * @return cost along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -69,7 +69,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost item. + * @return a cost item along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CustomImagesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CustomImagesClient.java index f62f57f8cb68..eba68094d45e 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CustomImagesClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CustomImagesClient.java @@ -24,7 +24,7 @@ public interface CustomImagesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName); @@ -42,7 +42,7 @@ public interface CustomImagesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -79,7 +79,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom image. + * @return custom image along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -95,9 +95,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return the {@link SyncPoller} for polling of a custom image. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CustomImageInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, CustomImageInner customImage); @@ -112,9 +112,9 @@ SyncPoller, CustomImageInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return the {@link SyncPoller} for polling of a custom image. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CustomImageInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, CustomImageInner customImage, Context context); @@ -160,9 +160,9 @@ CustomImageInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String labName, String name); /** @@ -175,9 +175,9 @@ CustomImageInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String name, Context context); @@ -234,7 +234,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return a custom image along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/DisksClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/DisksClient.java index 4e6fda42b3e6..92ec775f9f66 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/DisksClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/DisksClient.java @@ -27,7 +27,7 @@ public interface DisksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName, String username); @@ -46,7 +46,7 @@ public interface DisksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -86,7 +86,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk. + * @return disk along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -103,9 +103,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return the {@link SyncPoller} for polling of a Disk. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DiskInner> beginCreateOrUpdate( String resourceGroupName, String labName, String username, String name, DiskInner disk); @@ -121,9 +121,9 @@ SyncPoller, DiskInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return the {@link SyncPoller} for polling of a Disk. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DiskInner> beginCreateOrUpdate( String resourceGroupName, String labName, String username, String name, DiskInner disk, Context context); @@ -171,9 +171,9 @@ DiskInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String username, String name); @@ -188,9 +188,9 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String username, String name, Context context); @@ -251,7 +251,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return a Disk along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -268,9 +268,9 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginAttach( String resourceGroupName, String labName, @@ -290,9 +290,9 @@ SyncPoller, Void> beginAttach( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginAttach( String resourceGroupName, String labName, @@ -355,9 +355,9 @@ void attach( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDetach( String resourceGroupName, String labName, @@ -378,9 +378,9 @@ SyncPoller, Void> beginDetach( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDetach( String resourceGroupName, String labName, diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/EnvironmentsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/EnvironmentsClient.java index c7cc0d54c506..47af129cbb33 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/EnvironmentsClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/EnvironmentsClient.java @@ -25,7 +25,7 @@ public interface EnvironmentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName, String username); @@ -44,7 +44,7 @@ public interface EnvironmentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -84,7 +84,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment. + * @return environment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -101,9 +101,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return the {@link SyncPoller} for polling of an environment, which is essentially an ARM template deployment. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DtlEnvironmentInner> beginCreateOrUpdate( String resourceGroupName, String labName, String username, String name, DtlEnvironmentInner dtlEnvironment); @@ -119,9 +119,9 @@ SyncPoller, DtlEnvironmentInner> beginCreateOrUp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return the {@link SyncPoller} for polling of an environment, which is essentially an ARM template deployment. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DtlEnvironmentInner> beginCreateOrUpdate( String resourceGroupName, String labName, @@ -180,9 +180,9 @@ DtlEnvironmentInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String username, String name); @@ -197,9 +197,9 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String username, String name, Context context); @@ -261,7 +261,7 @@ DtlEnvironmentInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return an environment, which is essentially an ARM template deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/FormulasClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/FormulasClient.java index e5897892f1d3..b548a4711beb 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/FormulasClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/FormulasClient.java @@ -24,7 +24,7 @@ public interface FormulasClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName); @@ -42,7 +42,7 @@ public interface FormulasClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -79,7 +79,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return formula. + * @return formula along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -95,9 +95,10 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return the {@link SyncPoller} for polling of a formula for creating a VM, specifying an image base and other + * parameters. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FormulaInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, FormulaInner formula); @@ -112,9 +113,10 @@ SyncPoller, FormulaInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return the {@link SyncPoller} for polling of a formula for creating a VM, specifying an image base and other + * parameters. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FormulaInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, FormulaInner formula, Context context); @@ -173,7 +175,7 @@ FormulaInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context); @@ -204,7 +206,7 @@ FormulaInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return a formula for creating a VM, specifying an image base and other parameters along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GalleryImagesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GalleryImagesClient.java index 4dde1cab7c18..c4e03f1f9b6e 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GalleryImagesClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GalleryImagesClient.java @@ -20,7 +20,7 @@ public interface GalleryImagesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName); @@ -38,7 +38,7 @@ public interface GalleryImagesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GlobalSchedulesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GlobalSchedulesClient.java index 2056c0c2030a..98bea06adb24 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GlobalSchedulesClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GlobalSchedulesClient.java @@ -22,7 +22,7 @@ public interface GlobalSchedulesClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -38,7 +38,7 @@ public interface GlobalSchedulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String expand, String filter, Integer top, String orderby, Context context); @@ -50,7 +50,7 @@ public interface GlobalSchedulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -67,7 +67,7 @@ public interface GlobalSchedulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup( @@ -96,7 +96,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -126,7 +126,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -153,7 +153,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String name, Context context); @@ -182,7 +182,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -196,9 +196,9 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginExecute(String resourceGroupName, String name); /** @@ -210,9 +210,9 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginExecute(String resourceGroupName, String name, Context context); /** @@ -249,9 +249,9 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRetarget( String resourceGroupName, String name, RetargetScheduleProperties retargetScheduleProperties); @@ -265,9 +265,9 @@ SyncPoller, Void> beginRetarget( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRetarget( String resourceGroupName, String name, RetargetScheduleProperties retargetScheduleProperties, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/LabsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/LabsClient.java index 7c67e3a3e40d..2a4fb75c2896 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/LabsClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/LabsClient.java @@ -27,7 +27,7 @@ public interface LabsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -43,7 +43,7 @@ public interface LabsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String expand, String filter, Integer top, String orderby, Context context); @@ -55,7 +55,7 @@ public interface LabsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -72,7 +72,7 @@ public interface LabsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup( @@ -101,7 +101,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lab. + * @return lab along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -116,9 +116,9 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return the {@link SyncPoller} for polling of a lab. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LabInner> beginCreateOrUpdate(String resourceGroupName, String name, LabInner lab); /** @@ -131,9 +131,9 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return the {@link SyncPoller} for polling of a lab. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LabInner> beginCreateOrUpdate( String resourceGroupName, String name, LabInner lab, Context context); @@ -174,9 +174,9 @@ SyncPoller, LabInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String name); /** @@ -188,9 +188,9 @@ SyncPoller, LabInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context); /** @@ -242,7 +242,7 @@ SyncPoller, LabInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return a lab along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse(String resourceGroupName, String name, LabFragment lab, Context context); @@ -255,9 +255,9 @@ SyncPoller, LabInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginClaimAnyVm(String resourceGroupName, String name); /** @@ -269,9 +269,9 @@ SyncPoller, LabInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginClaimAnyVm(String resourceGroupName, String name, Context context); /** @@ -308,9 +308,9 @@ SyncPoller, LabInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginCreateEnvironment( String resourceGroupName, String name, LabVirtualMachineCreationParameter labVirtualMachineCreationParameter); @@ -324,9 +324,9 @@ SyncPoller, Void> beginCreateEnvironment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginCreateEnvironment( String resourceGroupName, String name, @@ -374,9 +374,9 @@ void createEnvironment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginExportResourceUsage( String resourceGroupName, String name, ExportResourceUsageParameters exportResourceUsageParameters); @@ -390,9 +390,9 @@ SyncPoller, Void> beginExportResourceUsage( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginExportResourceUsage( String resourceGroupName, String name, @@ -456,7 +456,7 @@ GenerateUploadUriResponseInner generateUploadUri( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response body for generating an upload URI. + * @return response body for generating an upload URI along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response generateUploadUriWithResponse( @@ -472,9 +472,9 @@ Response generateUploadUriWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginImportVirtualMachine( String resourceGroupName, String name, ImportLabVirtualMachineRequest importLabVirtualMachineRequest); @@ -489,9 +489,9 @@ SyncPoller, Void> beginImportVirtualMachine( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginImportVirtualMachine( String resourceGroupName, String name, @@ -540,7 +540,7 @@ void importVirtualMachine( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listVhds(String resourceGroupName, String name); @@ -554,7 +554,7 @@ void importVirtualMachine( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listVhds(String resourceGroupName, String name, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/NotificationChannelsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/NotificationChannelsClient.java index 2cdf8ee32c5e..d568d02cf75d 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/NotificationChannelsClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/NotificationChannelsClient.java @@ -23,7 +23,7 @@ public interface NotificationChannelsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName); @@ -41,7 +41,7 @@ public interface NotificationChannelsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -78,7 +78,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return notification channel. + * @return notification channel along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -111,7 +111,7 @@ NotificationChannelInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a notification. + * @return a notification along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -144,7 +144,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context); @@ -176,7 +176,7 @@ NotificationChannelInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a notification. + * @return a notification along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -211,7 +211,7 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response notifyWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/OperationsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/OperationsClient.java index de71e11a3351..3279f22e4dc6 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/OperationsClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/OperationsClient.java @@ -34,7 +34,7 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation. + * @return operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String locationName, String name, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/PoliciesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/PoliciesClient.java index 375754a907f0..1210105c9f97 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/PoliciesClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/PoliciesClient.java @@ -23,7 +23,7 @@ public interface PoliciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName, String policySetName); @@ -42,7 +42,7 @@ public interface PoliciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -82,7 +82,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy. + * @return policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -117,7 +117,7 @@ PolicyInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Policy. + * @return a Policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -153,7 +153,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( @@ -188,7 +188,7 @@ PolicyInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Policy. + * @return a Policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/PolicySetsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/PolicySetsClient.java index 41aec72bb87e..4321efc34ab6 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/PolicySetsClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/PolicySetsClient.java @@ -40,7 +40,7 @@ EvaluatePoliciesResponseInner evaluatePolicies( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response body for evaluating a policy set. + * @return response body for evaluating a policy set along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response evaluatePoliciesWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ProviderOperationsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ProviderOperationsClient.java index 8b5762ace47c..4d6810b96d7c 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ProviderOperationsClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ProviderOperationsClient.java @@ -17,7 +17,7 @@ public interface ProviderOperationsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +29,7 @@ public interface ProviderOperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/SchedulesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/SchedulesClient.java index ea32206bbdd6..434c8945fdae 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/SchedulesClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/SchedulesClient.java @@ -24,7 +24,7 @@ public interface SchedulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName); @@ -42,7 +42,7 @@ public interface SchedulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -79,7 +79,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -111,7 +111,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -140,7 +140,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context); @@ -171,7 +171,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -186,9 +186,9 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginExecute(String resourceGroupName, String labName, String name); /** @@ -201,9 +201,9 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginExecute( String resourceGroupName, String labName, String name, Context context); @@ -243,7 +243,7 @@ SyncPoller, Void> beginExecute( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listApplicable(String resourceGroupName, String labName, String name); @@ -258,7 +258,7 @@ SyncPoller, Void> beginExecute( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listApplicable(String resourceGroupName, String labName, String name, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/SecretsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/SecretsClient.java index 4eefb92a8939..1545f0e2d518 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/SecretsClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/SecretsClient.java @@ -25,7 +25,7 @@ public interface SecretsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName, String username); @@ -44,7 +44,7 @@ public interface SecretsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -84,7 +84,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secret. + * @return secret along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -101,9 +101,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return the {@link SyncPoller} for polling of a secret. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SecretInner> beginCreateOrUpdate( String resourceGroupName, String labName, String username, String name, SecretInner secret); @@ -119,9 +119,9 @@ SyncPoller, SecretInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return the {@link SyncPoller} for polling of a secret. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SecretInner> beginCreateOrUpdate( String resourceGroupName, String labName, String username, String name, SecretInner secret, Context context); @@ -185,7 +185,7 @@ SecretInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( @@ -219,7 +219,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return a secret along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ServiceFabricSchedulesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ServiceFabricSchedulesClient.java index 76f59363278b..770e2f7ba657 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ServiceFabricSchedulesClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ServiceFabricSchedulesClient.java @@ -26,7 +26,7 @@ public interface ServiceFabricSchedulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -47,7 +47,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -90,7 +90,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -138,7 +138,7 @@ ScheduleInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -177,7 +177,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( @@ -224,7 +224,7 @@ ScheduleInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -247,9 +247,9 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginExecute( String resourceGroupName, String labName, String username, String serviceFabricName, String name); @@ -265,9 +265,9 @@ SyncPoller, Void> beginExecute( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginExecute( String resourceGroupName, String labName, diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ServiceFabricsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ServiceFabricsClient.java index dfd47c899d69..dbe49b5e44e8 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ServiceFabricsClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ServiceFabricsClient.java @@ -26,7 +26,7 @@ public interface ServiceFabricsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName, String username); @@ -45,7 +45,7 @@ public interface ServiceFabricsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -85,7 +85,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service fabric. + * @return service fabric along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -102,9 +102,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return the {@link SyncPoller} for polling of a Service Fabric. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServiceFabricInner> beginCreateOrUpdate( String resourceGroupName, String labName, String username, String name, ServiceFabricInner serviceFabric); @@ -120,9 +120,9 @@ SyncPoller, ServiceFabricInner> beginCreateOrUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return the {@link SyncPoller} for polling of a Service Fabric. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServiceFabricInner> beginCreateOrUpdate( String resourceGroupName, String labName, @@ -181,9 +181,9 @@ ServiceFabricInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String username, String name); @@ -198,9 +198,9 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String username, String name, Context context); @@ -262,7 +262,7 @@ ServiceFabricInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return a Service Fabric along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -300,7 +300,7 @@ ApplicableScheduleInner listApplicableSchedules( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listApplicableSchedulesWithResponse( @@ -316,9 +316,9 @@ Response listApplicableSchedulesWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart( String resourceGroupName, String labName, String username, String name); @@ -333,9 +333,9 @@ SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart( String resourceGroupName, String labName, String username, String name, Context context); @@ -378,9 +378,9 @@ SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( String resourceGroupName, String labName, String username, String name); @@ -395,9 +395,9 @@ SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( String resourceGroupName, String labName, String username, String name, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ServiceRunnersClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ServiceRunnersClient.java index bd2b2736a4cb..7823317ee235 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ServiceRunnersClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ServiceRunnersClient.java @@ -36,7 +36,7 @@ public interface ServiceRunnersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service runner. + * @return service runner along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -69,7 +69,7 @@ ServiceRunnerInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container for a managed identity to execute DevTest lab services. + * @return a container for a managed identity to execute DevTest lab services along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -98,7 +98,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/UsersClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/UsersClient.java index 4b11461cecb0..c4edf7149dbc 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/UsersClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/UsersClient.java @@ -24,7 +24,7 @@ public interface UsersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName); @@ -42,7 +42,7 @@ public interface UsersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -79,7 +79,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user profile. + * @return user profile along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -95,9 +95,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return the {@link SyncPoller} for polling of profile of a lab user. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, UserInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, UserInner user); @@ -112,9 +112,9 @@ SyncPoller, UserInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return the {@link SyncPoller} for polling of profile of a lab user. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, UserInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, UserInner user, Context context); @@ -158,9 +158,9 @@ SyncPoller, UserInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String labName, String name); /** @@ -173,9 +173,9 @@ SyncPoller, UserInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String name, Context context); @@ -232,7 +232,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return profile of a lab user along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/VirtualMachineSchedulesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/VirtualMachineSchedulesClient.java index f65bbd0104c7..1023c521c381 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/VirtualMachineSchedulesClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/VirtualMachineSchedulesClient.java @@ -25,7 +25,7 @@ public interface VirtualMachineSchedulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName, String virtualMachineName); @@ -44,7 +44,7 @@ public interface VirtualMachineSchedulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -84,7 +84,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -124,7 +124,7 @@ ScheduleInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -160,7 +160,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( @@ -195,7 +195,7 @@ ScheduleInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -216,9 +216,9 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginExecute( String resourceGroupName, String labName, String virtualMachineName, String name); @@ -233,9 +233,9 @@ SyncPoller, Void> beginExecute( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginExecute( String resourceGroupName, String labName, String virtualMachineName, String name, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/VirtualMachinesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/VirtualMachinesClient.java index 317f3a8544ea..7b602a3e1bbe 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/VirtualMachinesClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/VirtualMachinesClient.java @@ -30,7 +30,7 @@ public interface VirtualMachinesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName); @@ -49,7 +49,7 @@ public interface VirtualMachinesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -87,7 +87,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -103,9 +103,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return the {@link SyncPoller} for polling of a virtual machine. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LabVirtualMachineInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, LabVirtualMachineInner labVirtualMachine); @@ -120,9 +120,9 @@ SyncPoller, LabVirtualMachineInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return the {@link SyncPoller} for polling of a virtual machine. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LabVirtualMachineInner> beginCreateOrUpdate( String resourceGroupName, String labName, @@ -176,9 +176,9 @@ LabVirtualMachineInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String labName, String name); /** @@ -191,9 +191,9 @@ LabVirtualMachineInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String name, Context context); @@ -251,7 +251,7 @@ LabVirtualMachineInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return a virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -271,9 +271,9 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginAddDataDisk( String resourceGroupName, String labName, String name, DataDiskProperties dataDiskProperties); @@ -288,9 +288,9 @@ SyncPoller, Void> beginAddDataDisk( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginAddDataDisk( String resourceGroupName, String labName, String name, DataDiskProperties dataDiskProperties, Context context); @@ -334,9 +334,9 @@ void addDataDisk( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginApplyArtifacts( String resourceGroupName, String labName, String name, ApplyArtifactsRequest applyArtifactsRequest); @@ -351,9 +351,9 @@ SyncPoller, Void> beginApplyArtifacts( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginApplyArtifacts( String resourceGroupName, String labName, @@ -405,9 +405,9 @@ void applyArtifacts( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginClaim(String resourceGroupName, String labName, String name); /** @@ -420,9 +420,9 @@ void applyArtifacts( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginClaim( String resourceGroupName, String labName, String name, Context context); @@ -463,9 +463,9 @@ SyncPoller, Void> beginClaim( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDetachDataDisk( String resourceGroupName, String labName, String name, DetachDataDiskProperties detachDataDiskProperties); @@ -480,9 +480,9 @@ SyncPoller, Void> beginDetachDataDisk( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDetachDataDisk( String resourceGroupName, String labName, @@ -549,7 +549,8 @@ void detachDataDisk( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a string that represents the contents of the RDP file for the virtual machine. + * @return a string that represents the contents of the RDP file for the virtual machine along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getRdpFileContentsWithResponse( @@ -579,7 +580,7 @@ Response getRdpFileContentsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listApplicableSchedulesWithResponse( @@ -594,9 +595,9 @@ Response listApplicableSchedulesWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRedeploy(String resourceGroupName, String labName, String name); /** @@ -609,9 +610,9 @@ Response listApplicableSchedulesWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRedeploy( String resourceGroupName, String labName, String name, Context context); @@ -652,9 +653,9 @@ SyncPoller, Void> beginRedeploy( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginResize( String resourceGroupName, String labName, @@ -672,9 +673,9 @@ SyncPoller, Void> beginResize( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginResize( String resourceGroupName, String labName, @@ -729,9 +730,9 @@ void resize( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestart(String resourceGroupName, String labName, String name); /** @@ -744,9 +745,9 @@ void resize( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestart( String resourceGroupName, String labName, String name, Context context); @@ -786,9 +787,9 @@ SyncPoller, Void> beginRestart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart(String resourceGroupName, String labName, String name); /** @@ -801,9 +802,9 @@ SyncPoller, Void> beginRestart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart( String resourceGroupName, String labName, String name, Context context); @@ -843,9 +844,9 @@ SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop(String resourceGroupName, String labName, String name); /** @@ -858,9 +859,9 @@ SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( String resourceGroupName, String labName, String name, Context context); @@ -901,9 +902,9 @@ SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginTransferDisks(String resourceGroupName, String labName, String name); /** @@ -917,9 +918,9 @@ SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginTransferDisks( String resourceGroupName, String labName, String name, Context context); @@ -961,9 +962,9 @@ SyncPoller, Void> beginTransferDisks( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginUnClaim(String resourceGroupName, String labName, String name); /** @@ -976,9 +977,9 @@ SyncPoller, Void> beginTransferDisks( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginUnClaim( String resourceGroupName, String labName, String name, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/VirtualNetworksClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/VirtualNetworksClient.java index aa4dc054554c..9b3d56db8e3d 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/VirtualNetworksClient.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/VirtualNetworksClient.java @@ -24,7 +24,7 @@ public interface VirtualNetworksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String labName); @@ -42,7 +42,7 @@ public interface VirtualNetworksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -79,7 +79,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network. + * @return virtual network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -95,9 +95,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return the {@link SyncPoller} for polling of a virtual network. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualNetworkInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork); @@ -112,9 +112,9 @@ SyncPoller, VirtualNetworkInner> beginCreateOrUp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return the {@link SyncPoller} for polling of a virtual network. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualNetworkInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork, Context context); @@ -160,9 +160,9 @@ VirtualNetworkInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String labName, String name); /** @@ -175,9 +175,9 @@ VirtualNetworkInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String name, Context context); @@ -235,7 +235,7 @@ VirtualNetworkInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return a virtual network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ApplicableScheduleInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ApplicableScheduleInner.java index 1fb9d099da1c..2de1716564e0 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ApplicableScheduleInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ApplicableScheduleInner.java @@ -5,32 +5,42 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Schedules applicable to a virtual machine. The schedules may have been defined on a VM or on lab level. */ -@JsonFlatten @Fluent -public class ApplicableScheduleInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicableScheduleInner.class); - +public final class ApplicableScheduleInner extends Resource { /* - * The auto-shutdown schedule, if one has been set at the lab or lab - * resource level. + * The properties of the resource. */ - @JsonProperty(value = "properties.labVmsShutdown") - private ScheduleInner labVmsShutdown; + @JsonProperty(value = "properties", required = true) + private ApplicableSchedulePropertiesInner innerProperties = new ApplicableSchedulePropertiesInner(); - /* - * The auto-startup schedule, if one has been set at the lab or lab - * resource level. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.labVmsStartup") - private ScheduleInner labVmsStartup; + private ApplicableSchedulePropertiesInner innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public ApplicableScheduleInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ApplicableScheduleInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the labVmsShutdown property: The auto-shutdown schedule, if one has been set at the lab or lab resource @@ -39,7 +49,7 @@ public class ApplicableScheduleInner extends Resource { * @return the labVmsShutdown value. */ public ScheduleInner labVmsShutdown() { - return this.labVmsShutdown; + return this.innerProperties() == null ? null : this.innerProperties().labVmsShutdown(); } /** @@ -50,7 +60,10 @@ public ScheduleInner labVmsShutdown() { * @return the ApplicableScheduleInner object itself. */ public ApplicableScheduleInner withLabVmsShutdown(ScheduleInner labVmsShutdown) { - this.labVmsShutdown = labVmsShutdown; + if (this.innerProperties() == null) { + this.innerProperties = new ApplicableSchedulePropertiesInner(); + } + this.innerProperties().withLabVmsShutdown(labVmsShutdown); return this; } @@ -60,7 +73,7 @@ public ApplicableScheduleInner withLabVmsShutdown(ScheduleInner labVmsShutdown) * @return the labVmsStartup value. */ public ScheduleInner labVmsStartup() { - return this.labVmsStartup; + return this.innerProperties() == null ? null : this.innerProperties().labVmsStartup(); } /** @@ -70,21 +83,10 @@ public ScheduleInner labVmsStartup() { * @return the ApplicableScheduleInner object itself. */ public ApplicableScheduleInner withLabVmsStartup(ScheduleInner labVmsStartup) { - this.labVmsStartup = labVmsStartup; - return this; - } - - /** {@inheritDoc} */ - @Override - public ApplicableScheduleInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ApplicableScheduleInner withTags(Map tags) { - super.withTags(tags); + if (this.innerProperties() == null) { + this.innerProperties = new ApplicableSchedulePropertiesInner(); + } + this.innerProperties().withLabVmsStartup(labVmsStartup); return this; } @@ -94,11 +96,15 @@ public ApplicableScheduleInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (labVmsShutdown() != null) { - labVmsShutdown().validate(); - } - if (labVmsStartup() != null) { - labVmsStartup().validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model ApplicableScheduleInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicableScheduleInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ApplicableSchedulePropertiesInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ApplicableSchedulePropertiesInner.java new file mode 100644 index 000000000000..db7bd46895be --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ApplicableSchedulePropertiesInner.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of a schedules applicable to a virtual machine. */ +@Fluent +public final class ApplicableSchedulePropertiesInner { + /* + * The auto-shutdown schedule, if one has been set at the lab or lab + * resource level. + */ + @JsonProperty(value = "labVmsShutdown") + private ScheduleInner labVmsShutdown; + + /* + * The auto-startup schedule, if one has been set at the lab or lab + * resource level. + */ + @JsonProperty(value = "labVmsStartup") + private ScheduleInner labVmsStartup; + + /** + * Get the labVmsShutdown property: The auto-shutdown schedule, if one has been set at the lab or lab resource + * level. + * + * @return the labVmsShutdown value. + */ + public ScheduleInner labVmsShutdown() { + return this.labVmsShutdown; + } + + /** + * Set the labVmsShutdown property: The auto-shutdown schedule, if one has been set at the lab or lab resource + * level. + * + * @param labVmsShutdown the labVmsShutdown value to set. + * @return the ApplicableSchedulePropertiesInner object itself. + */ + public ApplicableSchedulePropertiesInner withLabVmsShutdown(ScheduleInner labVmsShutdown) { + this.labVmsShutdown = labVmsShutdown; + return this; + } + + /** + * Get the labVmsStartup property: The auto-startup schedule, if one has been set at the lab or lab resource level. + * + * @return the labVmsStartup value. + */ + public ScheduleInner labVmsStartup() { + return this.labVmsStartup; + } + + /** + * Set the labVmsStartup property: The auto-startup schedule, if one has been set at the lab or lab resource level. + * + * @param labVmsStartup the labVmsStartup value to set. + * @return the ApplicableSchedulePropertiesInner object itself. + */ + public ApplicableSchedulePropertiesInner withLabVmsStartup(ScheduleInner labVmsStartup) { + this.labVmsStartup = labVmsStartup; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (labVmsShutdown() != null) { + labVmsShutdown().validate(); + } + if (labVmsStartup() != null) { + labVmsStartup().validate(); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArmTemplateInfoInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArmTemplateInfoInner.java index d751614cb14c..5de4035a2df3 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArmTemplateInfoInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArmTemplateInfoInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Information about a generated ARM template. */ @Fluent public final class ArmTemplateInfoInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmTemplateInfoInner.class); - /* * The template's contents. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArmTemplateInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArmTemplateInner.java index fa6c94a5a485..ed1df1074bec 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArmTemplateInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArmTemplateInner.java @@ -4,71 +4,46 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; +import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.ParametersValueFileInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** An Azure Resource Manager template. */ -@JsonFlatten -@Immutable -public class ArmTemplateInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmTemplateInner.class); - - /* - * The display name of the ARM template. - */ - @JsonProperty(value = "properties.displayName", access = JsonProperty.Access.WRITE_ONLY) - private String displayName; - - /* - * The description of the ARM template. - */ - @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * The publisher of the ARM template. - */ - @JsonProperty(value = "properties.publisher", access = JsonProperty.Access.WRITE_ONLY) - private String publisher; - - /* - * The URI to the icon of the ARM template. - */ - @JsonProperty(value = "properties.icon", access = JsonProperty.Access.WRITE_ONLY) - private String icon; - +@Fluent +public final class ArmTemplateInner extends Resource { /* - * The contents of the ARM template. + * The properties of the resource. */ - @JsonProperty(value = "properties.contents", access = JsonProperty.Access.WRITE_ONLY) - private Object contents; + @JsonProperty(value = "properties", required = true) + private ArmTemplateProperties innerProperties = new ArmTemplateProperties(); - /* - * The creation date of the armTemplate. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDate; + private ArmTemplateProperties innerProperties() { + return this.innerProperties; + } - /* - * File name and parameter values information from all - * azuredeploy.*.parameters.json for the ARM template. - */ - @JsonProperty(value = "properties.parametersValueFilesInfo", access = JsonProperty.Access.WRITE_ONLY) - private List parametersValueFilesInfo; + /** {@inheritDoc} */ + @Override + public ArmTemplateInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * Whether or not ARM template is enabled for use by lab user. - */ - @JsonProperty(value = "properties.enabled", access = JsonProperty.Access.WRITE_ONLY) - private Boolean enabled; + /** {@inheritDoc} */ + @Override + public ArmTemplateInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the displayName property: The display name of the ARM template. @@ -76,7 +51,7 @@ public class ArmTemplateInner extends Resource { * @return the displayName value. */ public String displayName() { - return this.displayName; + return this.innerProperties() == null ? null : this.innerProperties().displayName(); } /** @@ -85,7 +60,7 @@ public String displayName() { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -94,7 +69,7 @@ public String description() { * @return the publisher value. */ public String publisher() { - return this.publisher; + return this.innerProperties() == null ? null : this.innerProperties().publisher(); } /** @@ -103,7 +78,7 @@ public String publisher() { * @return the icon value. */ public String icon() { - return this.icon; + return this.innerProperties() == null ? null : this.innerProperties().icon(); } /** @@ -112,7 +87,7 @@ public String icon() { * @return the contents value. */ public Object contents() { - return this.contents; + return this.innerProperties() == null ? null : this.innerProperties().contents(); } /** @@ -121,7 +96,7 @@ public Object contents() { * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -131,7 +106,7 @@ public OffsetDateTime createdDate() { * @return the parametersValueFilesInfo value. */ public List parametersValueFilesInfo() { - return this.parametersValueFilesInfo; + return this.innerProperties() == null ? null : this.innerProperties().parametersValueFilesInfo(); } /** @@ -140,21 +115,7 @@ public List parametersValueFilesInfo() { * @return the enabled value. */ public Boolean enabled() { - return this.enabled; - } - - /** {@inheritDoc} */ - @Override - public ArmTemplateInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ArmTemplateInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().enabled(); } /** @@ -163,8 +124,15 @@ public ArmTemplateInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (parametersValueFilesInfo() != null) { - parametersValueFilesInfo().forEach(e -> e.validate()); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model ArmTemplateInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ArmTemplateInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArmTemplateProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArmTemplateProperties.java new file mode 100644 index 000000000000..ee6b1ce4dc7e --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArmTemplateProperties.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.devtestlabs.models.ParametersValueFileInfo; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Properties of an Azure Resource Manager template. */ +@Immutable +public final class ArmTemplateProperties { + /* + * The display name of the ARM template. + */ + @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /* + * The description of the ARM template. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * The publisher of the ARM template. + */ + @JsonProperty(value = "publisher", access = JsonProperty.Access.WRITE_ONLY) + private String publisher; + + /* + * The URI to the icon of the ARM template. + */ + @JsonProperty(value = "icon", access = JsonProperty.Access.WRITE_ONLY) + private String icon; + + /* + * The contents of the ARM template. + */ + @JsonProperty(value = "contents", access = JsonProperty.Access.WRITE_ONLY) + private Object contents; + + /* + * The creation date of the armTemplate. + */ + @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDate; + + /* + * File name and parameter values information from all + * azuredeploy.*.parameters.json for the ARM template. + */ + @JsonProperty(value = "parametersValueFilesInfo", access = JsonProperty.Access.WRITE_ONLY) + private List parametersValueFilesInfo; + + /* + * Whether or not ARM template is enabled for use by lab user. + */ + @JsonProperty(value = "enabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean enabled; + + /** + * Get the displayName property: The display name of the ARM template. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the description property: The description of the ARM template. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the publisher property: The publisher of the ARM template. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Get the icon property: The URI to the icon of the ARM template. + * + * @return the icon value. + */ + public String icon() { + return this.icon; + } + + /** + * Get the contents property: The contents of the ARM template. + * + * @return the contents value. + */ + public Object contents() { + return this.contents; + } + + /** + * Get the createdDate property: The creation date of the armTemplate. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Get the parametersValueFilesInfo property: File name and parameter values information from all + * azuredeploy.*.parameters.json for the ARM template. + * + * @return the parametersValueFilesInfo value. + */ + public List parametersValueFilesInfo() { + return this.parametersValueFilesInfo; + } + + /** + * Get the enabled property: Whether or not ARM template is enabled for use by lab user. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (parametersValueFilesInfo() != null) { + parametersValueFilesInfo().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactInner.java index 337b3537e162..a1299b04c662 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactInner.java @@ -4,68 +4,44 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; +import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.Map; /** An artifact. */ -@JsonFlatten -@Immutable -public class ArtifactInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactInner.class); - - /* - * The artifact's title. - */ - @JsonProperty(value = "properties.title", access = JsonProperty.Access.WRITE_ONLY) - private String title; - - /* - * The artifact's description. - */ - @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * The artifact's publisher. - */ - @JsonProperty(value = "properties.publisher", access = JsonProperty.Access.WRITE_ONLY) - private String publisher; - - /* - * The file path to the artifact. - */ - @JsonProperty(value = "properties.filePath", access = JsonProperty.Access.WRITE_ONLY) - private String filePath; - +@Fluent +public final class ArtifactInner extends Resource { /* - * The URI to the artifact icon. + * The properties of the resource. */ - @JsonProperty(value = "properties.icon", access = JsonProperty.Access.WRITE_ONLY) - private String icon; + @JsonProperty(value = "properties", required = true) + private ArtifactProperties innerProperties = new ArtifactProperties(); - /* - * The artifact's target OS. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.targetOsType", access = JsonProperty.Access.WRITE_ONLY) - private String targetOsType; + private ArtifactProperties innerProperties() { + return this.innerProperties; + } - /* - * The artifact's parameters. - */ - @JsonProperty(value = "properties.parameters", access = JsonProperty.Access.WRITE_ONLY) - private Object parameters; + /** {@inheritDoc} */ + @Override + public ArtifactInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The artifact's creation date. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDate; + /** {@inheritDoc} */ + @Override + public ArtifactInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the title property: The artifact's title. @@ -73,7 +49,7 @@ public class ArtifactInner extends Resource { * @return the title value. */ public String title() { - return this.title; + return this.innerProperties() == null ? null : this.innerProperties().title(); } /** @@ -82,7 +58,7 @@ public String title() { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -91,7 +67,7 @@ public String description() { * @return the publisher value. */ public String publisher() { - return this.publisher; + return this.innerProperties() == null ? null : this.innerProperties().publisher(); } /** @@ -100,7 +76,7 @@ public String publisher() { * @return the filePath value. */ public String filePath() { - return this.filePath; + return this.innerProperties() == null ? null : this.innerProperties().filePath(); } /** @@ -109,7 +85,7 @@ public String filePath() { * @return the icon value. */ public String icon() { - return this.icon; + return this.innerProperties() == null ? null : this.innerProperties().icon(); } /** @@ -118,7 +94,7 @@ public String icon() { * @return the targetOsType value. */ public String targetOsType() { - return this.targetOsType; + return this.innerProperties() == null ? null : this.innerProperties().targetOsType(); } /** @@ -127,7 +103,7 @@ public String targetOsType() { * @return the parameters value. */ public Object parameters() { - return this.parameters; + return this.innerProperties() == null ? null : this.innerProperties().parameters(); } /** @@ -136,21 +112,7 @@ public Object parameters() { * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; - } - - /** {@inheritDoc} */ - @Override - public ArtifactInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ArtifactInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -159,5 +121,14 @@ public ArtifactInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model ArtifactInner")); + } else { + innerProperties().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(ArtifactInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactProperties.java new file mode 100644 index 000000000000..9696822f7260 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactProperties.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Properties of an artifact. */ +@Immutable +public final class ArtifactProperties { + /* + * The artifact's title. + */ + @JsonProperty(value = "title", access = JsonProperty.Access.WRITE_ONLY) + private String title; + + /* + * The artifact's description. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * The artifact's publisher. + */ + @JsonProperty(value = "publisher", access = JsonProperty.Access.WRITE_ONLY) + private String publisher; + + /* + * The file path to the artifact. + */ + @JsonProperty(value = "filePath", access = JsonProperty.Access.WRITE_ONLY) + private String filePath; + + /* + * The URI to the artifact icon. + */ + @JsonProperty(value = "icon", access = JsonProperty.Access.WRITE_ONLY) + private String icon; + + /* + * The artifact's target OS. + */ + @JsonProperty(value = "targetOsType", access = JsonProperty.Access.WRITE_ONLY) + private String targetOsType; + + /* + * The artifact's parameters. + */ + @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY) + private Object parameters; + + /* + * The artifact's creation date. + */ + @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDate; + + /** + * Get the title property: The artifact's title. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Get the description property: The artifact's description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the publisher property: The artifact's publisher. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Get the filePath property: The file path to the artifact. + * + * @return the filePath value. + */ + public String filePath() { + return this.filePath; + } + + /** + * Get the icon property: The URI to the artifact icon. + * + * @return the icon value. + */ + public String icon() { + return this.icon; + } + + /** + * Get the targetOsType property: The artifact's target OS. + * + * @return the targetOsType value. + */ + public String targetOsType() { + return this.targetOsType; + } + + /** + * Get the parameters property: The artifact's parameters. + * + * @return the parameters value. + */ + public Object parameters() { + return this.parameters; + } + + /** + * Get the createdDate property: The artifact's creation date. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactSourceInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactSourceInner.java index eea399ba1661..9da6db1ec1e6 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactSourceInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactSourceInner.java @@ -5,87 +5,45 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.EnableStatus; import com.azure.resourcemanager.devtestlabs.models.SourceControlType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.Map; /** Properties of an artifact source. */ -@JsonFlatten @Fluent -public class ArtifactSourceInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactSourceInner.class); - - /* - * The artifact source's display name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - +public final class ArtifactSourceInner extends Resource { /* - * The artifact source's URI. + * The properties of the resource. */ - @JsonProperty(value = "properties.uri") - private String uri; + @JsonProperty(value = "properties", required = true) + private ArtifactSourceProperties innerProperties = new ArtifactSourceProperties(); - /* - * The artifact source's type. - */ - @JsonProperty(value = "properties.sourceType") - private SourceControlType sourceType; - - /* - * The folder containing artifacts. - */ - @JsonProperty(value = "properties.folderPath") - private String folderPath; - - /* - * The folder containing Azure Resource Manager templates. - */ - @JsonProperty(value = "properties.armTemplateFolderPath") - private String armTemplateFolderPath; - - /* - * The artifact source's branch reference. - */ - @JsonProperty(value = "properties.branchRef") - private String branchRef; - - /* - * The security token to authenticate to the artifact source. - */ - @JsonProperty(value = "properties.securityToken") - private String securityToken; - - /* - * Indicates if the artifact source is enabled (values: Enabled, Disabled). - */ - @JsonProperty(value = "properties.status") - private EnableStatus status; - - /* - * The artifact source's creation date. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDate; + private ArtifactSourceProperties innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public ArtifactSourceInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public ArtifactSourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the displayName property: The artifact source's display name. @@ -93,7 +51,7 @@ public class ArtifactSourceInner extends Resource { * @return the displayName value. */ public String displayName() { - return this.displayName; + return this.innerProperties() == null ? null : this.innerProperties().displayName(); } /** @@ -103,7 +61,10 @@ public String displayName() { * @return the ArtifactSourceInner object itself. */ public ArtifactSourceInner withDisplayName(String displayName) { - this.displayName = displayName; + if (this.innerProperties() == null) { + this.innerProperties = new ArtifactSourceProperties(); + } + this.innerProperties().withDisplayName(displayName); return this; } @@ -113,7 +74,7 @@ public ArtifactSourceInner withDisplayName(String displayName) { * @return the uri value. */ public String uri() { - return this.uri; + return this.innerProperties() == null ? null : this.innerProperties().uri(); } /** @@ -123,7 +84,10 @@ public String uri() { * @return the ArtifactSourceInner object itself. */ public ArtifactSourceInner withUri(String uri) { - this.uri = uri; + if (this.innerProperties() == null) { + this.innerProperties = new ArtifactSourceProperties(); + } + this.innerProperties().withUri(uri); return this; } @@ -133,7 +97,7 @@ public ArtifactSourceInner withUri(String uri) { * @return the sourceType value. */ public SourceControlType sourceType() { - return this.sourceType; + return this.innerProperties() == null ? null : this.innerProperties().sourceType(); } /** @@ -143,7 +107,10 @@ public SourceControlType sourceType() { * @return the ArtifactSourceInner object itself. */ public ArtifactSourceInner withSourceType(SourceControlType sourceType) { - this.sourceType = sourceType; + if (this.innerProperties() == null) { + this.innerProperties = new ArtifactSourceProperties(); + } + this.innerProperties().withSourceType(sourceType); return this; } @@ -153,7 +120,7 @@ public ArtifactSourceInner withSourceType(SourceControlType sourceType) { * @return the folderPath value. */ public String folderPath() { - return this.folderPath; + return this.innerProperties() == null ? null : this.innerProperties().folderPath(); } /** @@ -163,7 +130,10 @@ public String folderPath() { * @return the ArtifactSourceInner object itself. */ public ArtifactSourceInner withFolderPath(String folderPath) { - this.folderPath = folderPath; + if (this.innerProperties() == null) { + this.innerProperties = new ArtifactSourceProperties(); + } + this.innerProperties().withFolderPath(folderPath); return this; } @@ -173,7 +143,7 @@ public ArtifactSourceInner withFolderPath(String folderPath) { * @return the armTemplateFolderPath value. */ public String armTemplateFolderPath() { - return this.armTemplateFolderPath; + return this.innerProperties() == null ? null : this.innerProperties().armTemplateFolderPath(); } /** @@ -183,7 +153,10 @@ public String armTemplateFolderPath() { * @return the ArtifactSourceInner object itself. */ public ArtifactSourceInner withArmTemplateFolderPath(String armTemplateFolderPath) { - this.armTemplateFolderPath = armTemplateFolderPath; + if (this.innerProperties() == null) { + this.innerProperties = new ArtifactSourceProperties(); + } + this.innerProperties().withArmTemplateFolderPath(armTemplateFolderPath); return this; } @@ -193,7 +166,7 @@ public ArtifactSourceInner withArmTemplateFolderPath(String armTemplateFolderPat * @return the branchRef value. */ public String branchRef() { - return this.branchRef; + return this.innerProperties() == null ? null : this.innerProperties().branchRef(); } /** @@ -203,7 +176,10 @@ public String branchRef() { * @return the ArtifactSourceInner object itself. */ public ArtifactSourceInner withBranchRef(String branchRef) { - this.branchRef = branchRef; + if (this.innerProperties() == null) { + this.innerProperties = new ArtifactSourceProperties(); + } + this.innerProperties().withBranchRef(branchRef); return this; } @@ -213,7 +189,7 @@ public ArtifactSourceInner withBranchRef(String branchRef) { * @return the securityToken value. */ public String securityToken() { - return this.securityToken; + return this.innerProperties() == null ? null : this.innerProperties().securityToken(); } /** @@ -223,7 +199,10 @@ public String securityToken() { * @return the ArtifactSourceInner object itself. */ public ArtifactSourceInner withSecurityToken(String securityToken) { - this.securityToken = securityToken; + if (this.innerProperties() == null) { + this.innerProperties = new ArtifactSourceProperties(); + } + this.innerProperties().withSecurityToken(securityToken); return this; } @@ -233,7 +212,7 @@ public ArtifactSourceInner withSecurityToken(String securityToken) { * @return the status value. */ public EnableStatus status() { - return this.status; + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** @@ -243,7 +222,10 @@ public EnableStatus status() { * @return the ArtifactSourceInner object itself. */ public ArtifactSourceInner withStatus(EnableStatus status) { - this.status = status; + if (this.innerProperties() == null) { + this.innerProperties = new ArtifactSourceProperties(); + } + this.innerProperties().withStatus(status); return this; } @@ -253,7 +235,7 @@ public ArtifactSourceInner withStatus(EnableStatus status) { * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -262,7 +244,7 @@ public OffsetDateTime createdDate() { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -271,21 +253,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public ArtifactSourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ArtifactSourceInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -294,5 +262,15 @@ public ArtifactSourceInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model ArtifactSourceInner")); + } else { + innerProperties().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(ArtifactSourceInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactSourceProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactSourceProperties.java new file mode 100644 index 000000000000..7278badcebda --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ArtifactSourceProperties.java @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.EnableStatus; +import com.azure.resourcemanager.devtestlabs.models.SourceControlType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Properties of an artifact source. */ +@Fluent +public final class ArtifactSourceProperties { + /* + * The artifact source's display name. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * The artifact source's URI. + */ + @JsonProperty(value = "uri") + private String uri; + + /* + * The artifact source's type. + */ + @JsonProperty(value = "sourceType") + private SourceControlType sourceType; + + /* + * The folder containing artifacts. + */ + @JsonProperty(value = "folderPath") + private String folderPath; + + /* + * The folder containing Azure Resource Manager templates. + */ + @JsonProperty(value = "armTemplateFolderPath") + private String armTemplateFolderPath; + + /* + * The artifact source's branch reference. + */ + @JsonProperty(value = "branchRef") + private String branchRef; + + /* + * The security token to authenticate to the artifact source. + */ + @JsonProperty(value = "securityToken") + private String securityToken; + + /* + * Indicates if the artifact source is enabled (values: Enabled, Disabled). + */ + @JsonProperty(value = "status") + private EnableStatus status; + + /* + * The artifact source's creation date. + */ + @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDate; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the displayName property: The artifact source's display name. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The artifact source's display name. + * + * @param displayName the displayName value to set. + * @return the ArtifactSourceProperties object itself. + */ + public ArtifactSourceProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the uri property: The artifact source's URI. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: The artifact source's URI. + * + * @param uri the uri value to set. + * @return the ArtifactSourceProperties object itself. + */ + public ArtifactSourceProperties withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Get the sourceType property: The artifact source's type. + * + * @return the sourceType value. + */ + public SourceControlType sourceType() { + return this.sourceType; + } + + /** + * Set the sourceType property: The artifact source's type. + * + * @param sourceType the sourceType value to set. + * @return the ArtifactSourceProperties object itself. + */ + public ArtifactSourceProperties withSourceType(SourceControlType sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get the folderPath property: The folder containing artifacts. + * + * @return the folderPath value. + */ + public String folderPath() { + return this.folderPath; + } + + /** + * Set the folderPath property: The folder containing artifacts. + * + * @param folderPath the folderPath value to set. + * @return the ArtifactSourceProperties object itself. + */ + public ArtifactSourceProperties withFolderPath(String folderPath) { + this.folderPath = folderPath; + return this; + } + + /** + * Get the armTemplateFolderPath property: The folder containing Azure Resource Manager templates. + * + * @return the armTemplateFolderPath value. + */ + public String armTemplateFolderPath() { + return this.armTemplateFolderPath; + } + + /** + * Set the armTemplateFolderPath property: The folder containing Azure Resource Manager templates. + * + * @param armTemplateFolderPath the armTemplateFolderPath value to set. + * @return the ArtifactSourceProperties object itself. + */ + public ArtifactSourceProperties withArmTemplateFolderPath(String armTemplateFolderPath) { + this.armTemplateFolderPath = armTemplateFolderPath; + return this; + } + + /** + * Get the branchRef property: The artifact source's branch reference. + * + * @return the branchRef value. + */ + public String branchRef() { + return this.branchRef; + } + + /** + * Set the branchRef property: The artifact source's branch reference. + * + * @param branchRef the branchRef value to set. + * @return the ArtifactSourceProperties object itself. + */ + public ArtifactSourceProperties withBranchRef(String branchRef) { + this.branchRef = branchRef; + return this; + } + + /** + * Get the securityToken property: The security token to authenticate to the artifact source. + * + * @return the securityToken value. + */ + public String securityToken() { + return this.securityToken; + } + + /** + * Set the securityToken property: The security token to authenticate to the artifact source. + * + * @param securityToken the securityToken value to set. + * @return the ArtifactSourceProperties object itself. + */ + public ArtifactSourceProperties withSecurityToken(String securityToken) { + this.securityToken = securityToken; + return this; + } + + /** + * Get the status property: Indicates if the artifact source is enabled (values: Enabled, Disabled). + * + * @return the status value. + */ + public EnableStatus status() { + return this.status; + } + + /** + * Set the status property: Indicates if the artifact source is enabled (values: Enabled, Disabled). + * + * @param status the status value to set. + * @return the ArtifactSourceProperties object itself. + */ + public ArtifactSourceProperties withStatus(EnableStatus status) { + this.status = status; + return this; + } + + /** + * Get the createdDate property: The artifact source's creation date. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/CustomImageInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/CustomImageInner.java index 4c183a014e1d..f49e11e77e18 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/CustomImageInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/CustomImageInner.java @@ -5,97 +5,48 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.CustomImagePropertiesCustom; import com.azure.resourcemanager.devtestlabs.models.CustomImagePropertiesFromPlan; import com.azure.resourcemanager.devtestlabs.models.CustomImagePropertiesFromVm; import com.azure.resourcemanager.devtestlabs.models.DataDiskStorageTypeInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** A custom image. */ -@JsonFlatten @Fluent -public class CustomImageInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomImageInner.class); - - /* - * The virtual machine from which the image is to be created. - */ - @JsonProperty(value = "properties.vm") - private CustomImagePropertiesFromVm vm; - - /* - * The VHD from which the image is to be created. - */ - @JsonProperty(value = "properties.vhd") - private CustomImagePropertiesCustom vhd; - - /* - * The description of the custom image. - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * The author of the custom image. - */ - @JsonProperty(value = "properties.author") - private String author; - - /* - * The creation date of the custom image. - */ - @JsonProperty(value = "properties.creationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationDate; - - /* - * The Managed Image Id backing the custom image. - */ - @JsonProperty(value = "properties.managedImageId") - private String managedImageId; - +public final class CustomImageInner extends Resource { /* - * The Managed Snapshot Id backing the custom image. + * The properties of the resource. */ - @JsonProperty(value = "properties.managedSnapshotId") - private String managedSnapshotId; + @JsonProperty(value = "properties", required = true) + private CustomImageProperties innerProperties = new CustomImageProperties(); - /* - * Storage information about the data disks present in the custom image - */ - @JsonProperty(value = "properties.dataDiskStorageInfo") - private List dataDiskStorageInfo; - - /* - * Storage information about the plan related to this custom image - */ - @JsonProperty(value = "properties.customImagePlan") - private CustomImagePropertiesFromPlan customImagePlan; - - /* - * Whether or not the custom images underlying offer/plan has been enabled - * for programmatic deployment + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.isPlanAuthorized") - private Boolean isPlanAuthorized; + private CustomImageProperties innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public CustomImageInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public CustomImageInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the vm property: The virtual machine from which the image is to be created. @@ -103,7 +54,7 @@ public class CustomImageInner extends Resource { * @return the vm value. */ public CustomImagePropertiesFromVm vm() { - return this.vm; + return this.innerProperties() == null ? null : this.innerProperties().vm(); } /** @@ -113,7 +64,10 @@ public CustomImagePropertiesFromVm vm() { * @return the CustomImageInner object itself. */ public CustomImageInner withVm(CustomImagePropertiesFromVm vm) { - this.vm = vm; + if (this.innerProperties() == null) { + this.innerProperties = new CustomImageProperties(); + } + this.innerProperties().withVm(vm); return this; } @@ -123,7 +77,7 @@ public CustomImageInner withVm(CustomImagePropertiesFromVm vm) { * @return the vhd value. */ public CustomImagePropertiesCustom vhd() { - return this.vhd; + return this.innerProperties() == null ? null : this.innerProperties().vhd(); } /** @@ -133,7 +87,10 @@ public CustomImagePropertiesCustom vhd() { * @return the CustomImageInner object itself. */ public CustomImageInner withVhd(CustomImagePropertiesCustom vhd) { - this.vhd = vhd; + if (this.innerProperties() == null) { + this.innerProperties = new CustomImageProperties(); + } + this.innerProperties().withVhd(vhd); return this; } @@ -143,7 +100,7 @@ public CustomImageInner withVhd(CustomImagePropertiesCustom vhd) { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -153,7 +110,10 @@ public String description() { * @return the CustomImageInner object itself. */ public CustomImageInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new CustomImageProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -163,7 +123,7 @@ public CustomImageInner withDescription(String description) { * @return the author value. */ public String author() { - return this.author; + return this.innerProperties() == null ? null : this.innerProperties().author(); } /** @@ -173,7 +133,10 @@ public String author() { * @return the CustomImageInner object itself. */ public CustomImageInner withAuthor(String author) { - this.author = author; + if (this.innerProperties() == null) { + this.innerProperties = new CustomImageProperties(); + } + this.innerProperties().withAuthor(author); return this; } @@ -183,7 +146,7 @@ public CustomImageInner withAuthor(String author) { * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.creationDate; + return this.innerProperties() == null ? null : this.innerProperties().creationDate(); } /** @@ -192,7 +155,7 @@ public OffsetDateTime creationDate() { * @return the managedImageId value. */ public String managedImageId() { - return this.managedImageId; + return this.innerProperties() == null ? null : this.innerProperties().managedImageId(); } /** @@ -202,7 +165,10 @@ public String managedImageId() { * @return the CustomImageInner object itself. */ public CustomImageInner withManagedImageId(String managedImageId) { - this.managedImageId = managedImageId; + if (this.innerProperties() == null) { + this.innerProperties = new CustomImageProperties(); + } + this.innerProperties().withManagedImageId(managedImageId); return this; } @@ -212,7 +178,7 @@ public CustomImageInner withManagedImageId(String managedImageId) { * @return the managedSnapshotId value. */ public String managedSnapshotId() { - return this.managedSnapshotId; + return this.innerProperties() == null ? null : this.innerProperties().managedSnapshotId(); } /** @@ -222,7 +188,10 @@ public String managedSnapshotId() { * @return the CustomImageInner object itself. */ public CustomImageInner withManagedSnapshotId(String managedSnapshotId) { - this.managedSnapshotId = managedSnapshotId; + if (this.innerProperties() == null) { + this.innerProperties = new CustomImageProperties(); + } + this.innerProperties().withManagedSnapshotId(managedSnapshotId); return this; } @@ -232,7 +201,7 @@ public CustomImageInner withManagedSnapshotId(String managedSnapshotId) { * @return the dataDiskStorageInfo value. */ public List dataDiskStorageInfo() { - return this.dataDiskStorageInfo; + return this.innerProperties() == null ? null : this.innerProperties().dataDiskStorageInfo(); } /** @@ -242,7 +211,10 @@ public List dataDiskStorageInfo() { * @return the CustomImageInner object itself. */ public CustomImageInner withDataDiskStorageInfo(List dataDiskStorageInfo) { - this.dataDiskStorageInfo = dataDiskStorageInfo; + if (this.innerProperties() == null) { + this.innerProperties = new CustomImageProperties(); + } + this.innerProperties().withDataDiskStorageInfo(dataDiskStorageInfo); return this; } @@ -252,7 +224,7 @@ public CustomImageInner withDataDiskStorageInfo(List da * @return the customImagePlan value. */ public CustomImagePropertiesFromPlan customImagePlan() { - return this.customImagePlan; + return this.innerProperties() == null ? null : this.innerProperties().customImagePlan(); } /** @@ -262,7 +234,10 @@ public CustomImagePropertiesFromPlan customImagePlan() { * @return the CustomImageInner object itself. */ public CustomImageInner withCustomImagePlan(CustomImagePropertiesFromPlan customImagePlan) { - this.customImagePlan = customImagePlan; + if (this.innerProperties() == null) { + this.innerProperties = new CustomImageProperties(); + } + this.innerProperties().withCustomImagePlan(customImagePlan); return this; } @@ -273,7 +248,7 @@ public CustomImageInner withCustomImagePlan(CustomImagePropertiesFromPlan custom * @return the isPlanAuthorized value. */ public Boolean isPlanAuthorized() { - return this.isPlanAuthorized; + return this.innerProperties() == null ? null : this.innerProperties().isPlanAuthorized(); } /** @@ -284,7 +259,10 @@ public Boolean isPlanAuthorized() { * @return the CustomImageInner object itself. */ public CustomImageInner withIsPlanAuthorized(Boolean isPlanAuthorized) { - this.isPlanAuthorized = isPlanAuthorized; + if (this.innerProperties() == null) { + this.innerProperties = new CustomImageProperties(); + } + this.innerProperties().withIsPlanAuthorized(isPlanAuthorized); return this; } @@ -294,7 +272,7 @@ public CustomImageInner withIsPlanAuthorized(Boolean isPlanAuthorized) { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -303,21 +281,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public CustomImageInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public CustomImageInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -326,17 +290,15 @@ public CustomImageInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (vm() != null) { - vm().validate(); - } - if (vhd() != null) { - vhd().validate(); - } - if (dataDiskStorageInfo() != null) { - dataDiskStorageInfo().forEach(e -> e.validate()); - } - if (customImagePlan() != null) { - customImagePlan().validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model CustomImageInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(CustomImageInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/CustomImageProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/CustomImageProperties.java new file mode 100644 index 000000000000..a28dc16b82b1 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/CustomImageProperties.java @@ -0,0 +1,320 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.CustomImagePropertiesCustom; +import com.azure.resourcemanager.devtestlabs.models.CustomImagePropertiesFromPlan; +import com.azure.resourcemanager.devtestlabs.models.CustomImagePropertiesFromVm; +import com.azure.resourcemanager.devtestlabs.models.DataDiskStorageTypeInfo; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Properties of a custom image. */ +@Fluent +public final class CustomImageProperties { + /* + * The virtual machine from which the image is to be created. + */ + @JsonProperty(value = "vm") + private CustomImagePropertiesFromVm vm; + + /* + * The VHD from which the image is to be created. + */ + @JsonProperty(value = "vhd") + private CustomImagePropertiesCustom vhd; + + /* + * The description of the custom image. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The author of the custom image. + */ + @JsonProperty(value = "author") + private String author; + + /* + * The creation date of the custom image. + */ + @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationDate; + + /* + * The Managed Image Id backing the custom image. + */ + @JsonProperty(value = "managedImageId") + private String managedImageId; + + /* + * The Managed Snapshot Id backing the custom image. + */ + @JsonProperty(value = "managedSnapshotId") + private String managedSnapshotId; + + /* + * Storage information about the data disks present in the custom image + */ + @JsonProperty(value = "dataDiskStorageInfo") + private List dataDiskStorageInfo; + + /* + * Storage information about the plan related to this custom image + */ + @JsonProperty(value = "customImagePlan") + private CustomImagePropertiesFromPlan customImagePlan; + + /* + * Whether or not the custom images underlying offer/plan has been enabled + * for programmatic deployment + */ + @JsonProperty(value = "isPlanAuthorized") + private Boolean isPlanAuthorized; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the vm property: The virtual machine from which the image is to be created. + * + * @return the vm value. + */ + public CustomImagePropertiesFromVm vm() { + return this.vm; + } + + /** + * Set the vm property: The virtual machine from which the image is to be created. + * + * @param vm the vm value to set. + * @return the CustomImageProperties object itself. + */ + public CustomImageProperties withVm(CustomImagePropertiesFromVm vm) { + this.vm = vm; + return this; + } + + /** + * Get the vhd property: The VHD from which the image is to be created. + * + * @return the vhd value. + */ + public CustomImagePropertiesCustom vhd() { + return this.vhd; + } + + /** + * Set the vhd property: The VHD from which the image is to be created. + * + * @param vhd the vhd value to set. + * @return the CustomImageProperties object itself. + */ + public CustomImageProperties withVhd(CustomImagePropertiesCustom vhd) { + this.vhd = vhd; + return this; + } + + /** + * Get the description property: The description of the custom image. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the custom image. + * + * @param description the description value to set. + * @return the CustomImageProperties object itself. + */ + public CustomImageProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the author property: The author of the custom image. + * + * @return the author value. + */ + public String author() { + return this.author; + } + + /** + * Set the author property: The author of the custom image. + * + * @param author the author value to set. + * @return the CustomImageProperties object itself. + */ + public CustomImageProperties withAuthor(String author) { + this.author = author; + return this; + } + + /** + * Get the creationDate property: The creation date of the custom image. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the managedImageId property: The Managed Image Id backing the custom image. + * + * @return the managedImageId value. + */ + public String managedImageId() { + return this.managedImageId; + } + + /** + * Set the managedImageId property: The Managed Image Id backing the custom image. + * + * @param managedImageId the managedImageId value to set. + * @return the CustomImageProperties object itself. + */ + public CustomImageProperties withManagedImageId(String managedImageId) { + this.managedImageId = managedImageId; + return this; + } + + /** + * Get the managedSnapshotId property: The Managed Snapshot Id backing the custom image. + * + * @return the managedSnapshotId value. + */ + public String managedSnapshotId() { + return this.managedSnapshotId; + } + + /** + * Set the managedSnapshotId property: The Managed Snapshot Id backing the custom image. + * + * @param managedSnapshotId the managedSnapshotId value to set. + * @return the CustomImageProperties object itself. + */ + public CustomImageProperties withManagedSnapshotId(String managedSnapshotId) { + this.managedSnapshotId = managedSnapshotId; + return this; + } + + /** + * Get the dataDiskStorageInfo property: Storage information about the data disks present in the custom image. + * + * @return the dataDiskStorageInfo value. + */ + public List dataDiskStorageInfo() { + return this.dataDiskStorageInfo; + } + + /** + * Set the dataDiskStorageInfo property: Storage information about the data disks present in the custom image. + * + * @param dataDiskStorageInfo the dataDiskStorageInfo value to set. + * @return the CustomImageProperties object itself. + */ + public CustomImageProperties withDataDiskStorageInfo(List dataDiskStorageInfo) { + this.dataDiskStorageInfo = dataDiskStorageInfo; + return this; + } + + /** + * Get the customImagePlan property: Storage information about the plan related to this custom image. + * + * @return the customImagePlan value. + */ + public CustomImagePropertiesFromPlan customImagePlan() { + return this.customImagePlan; + } + + /** + * Set the customImagePlan property: Storage information about the plan related to this custom image. + * + * @param customImagePlan the customImagePlan value to set. + * @return the CustomImageProperties object itself. + */ + public CustomImageProperties withCustomImagePlan(CustomImagePropertiesFromPlan customImagePlan) { + this.customImagePlan = customImagePlan; + return this; + } + + /** + * Get the isPlanAuthorized property: Whether or not the custom images underlying offer/plan has been enabled for + * programmatic deployment. + * + * @return the isPlanAuthorized value. + */ + public Boolean isPlanAuthorized() { + return this.isPlanAuthorized; + } + + /** + * Set the isPlanAuthorized property: Whether or not the custom images underlying offer/plan has been enabled for + * programmatic deployment. + * + * @param isPlanAuthorized the isPlanAuthorized value to set. + * @return the CustomImageProperties object itself. + */ + public CustomImageProperties withIsPlanAuthorized(Boolean isPlanAuthorized) { + this.isPlanAuthorized = isPlanAuthorized; + return this; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vm() != null) { + vm().validate(); + } + if (vhd() != null) { + vhd().validate(); + } + if (dataDiskStorageInfo() != null) { + dataDiskStorageInfo().forEach(e -> e.validate()); + } + if (customImagePlan() != null) { + customImagePlan().validate(); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/DiskInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/DiskInner.java index e0846e50558f..6928937099c3 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/DiskInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/DiskInner.java @@ -5,87 +5,44 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.StorageType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.Map; /** A Disk. */ -@JsonFlatten @Fluent -public class DiskInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskInner.class); - - /* - * The storage type for the disk (i.e. Standard, Premium). - */ - @JsonProperty(value = "properties.diskType") - private StorageType diskType; - +public final class DiskInner extends Resource { /* - * The size of the disk in Gibibytes. + * The properties of the resource. */ - @JsonProperty(value = "properties.diskSizeGiB") - private Integer diskSizeGiB; + @JsonProperty(value = "properties", required = true) + private DiskProperties innerProperties = new DiskProperties(); - /* - * The resource ID of the VM to which this disk is leased. - */ - @JsonProperty(value = "properties.leasedByLabVmId") - private String leasedByLabVmId; - - /* - * When backed by a blob, the name of the VHD blob without extension. - */ - @JsonProperty(value = "properties.diskBlobName") - private String diskBlobName; - - /* - * When backed by a blob, the URI of underlying blob. - */ - @JsonProperty(value = "properties.diskUri") - private String diskUri; - - /* - * When backed by a blob, the storage account where the blob is. - */ - @JsonProperty(value = "properties.storageAccountId") - private String storageAccountId; - - /* - * The creation date of the disk. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDate; - - /* - * The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite). - */ - @JsonProperty(value = "properties.hostCaching") - private String hostCaching; - - /* - * When backed by managed disk, this is the ID of the compute disk - * resource. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.managedDiskId") - private String managedDiskId; + private DiskProperties innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public DiskInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public DiskInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the diskType property: The storage type for the disk (i.e. Standard, Premium). @@ -93,7 +50,7 @@ public class DiskInner extends Resource { * @return the diskType value. */ public StorageType diskType() { - return this.diskType; + return this.innerProperties() == null ? null : this.innerProperties().diskType(); } /** @@ -103,7 +60,10 @@ public StorageType diskType() { * @return the DiskInner object itself. */ public DiskInner withDiskType(StorageType diskType) { - this.diskType = diskType; + if (this.innerProperties() == null) { + this.innerProperties = new DiskProperties(); + } + this.innerProperties().withDiskType(diskType); return this; } @@ -113,7 +73,7 @@ public DiskInner withDiskType(StorageType diskType) { * @return the diskSizeGiB value. */ public Integer diskSizeGiB() { - return this.diskSizeGiB; + return this.innerProperties() == null ? null : this.innerProperties().diskSizeGiB(); } /** @@ -123,7 +83,10 @@ public Integer diskSizeGiB() { * @return the DiskInner object itself. */ public DiskInner withDiskSizeGiB(Integer diskSizeGiB) { - this.diskSizeGiB = diskSizeGiB; + if (this.innerProperties() == null) { + this.innerProperties = new DiskProperties(); + } + this.innerProperties().withDiskSizeGiB(diskSizeGiB); return this; } @@ -133,7 +96,7 @@ public DiskInner withDiskSizeGiB(Integer diskSizeGiB) { * @return the leasedByLabVmId value. */ public String leasedByLabVmId() { - return this.leasedByLabVmId; + return this.innerProperties() == null ? null : this.innerProperties().leasedByLabVmId(); } /** @@ -143,7 +106,10 @@ public String leasedByLabVmId() { * @return the DiskInner object itself. */ public DiskInner withLeasedByLabVmId(String leasedByLabVmId) { - this.leasedByLabVmId = leasedByLabVmId; + if (this.innerProperties() == null) { + this.innerProperties = new DiskProperties(); + } + this.innerProperties().withLeasedByLabVmId(leasedByLabVmId); return this; } @@ -153,7 +119,7 @@ public DiskInner withLeasedByLabVmId(String leasedByLabVmId) { * @return the diskBlobName value. */ public String diskBlobName() { - return this.diskBlobName; + return this.innerProperties() == null ? null : this.innerProperties().diskBlobName(); } /** @@ -163,7 +129,10 @@ public String diskBlobName() { * @return the DiskInner object itself. */ public DiskInner withDiskBlobName(String diskBlobName) { - this.diskBlobName = diskBlobName; + if (this.innerProperties() == null) { + this.innerProperties = new DiskProperties(); + } + this.innerProperties().withDiskBlobName(diskBlobName); return this; } @@ -173,7 +142,7 @@ public DiskInner withDiskBlobName(String diskBlobName) { * @return the diskUri value. */ public String diskUri() { - return this.diskUri; + return this.innerProperties() == null ? null : this.innerProperties().diskUri(); } /** @@ -183,7 +152,10 @@ public String diskUri() { * @return the DiskInner object itself. */ public DiskInner withDiskUri(String diskUri) { - this.diskUri = diskUri; + if (this.innerProperties() == null) { + this.innerProperties = new DiskProperties(); + } + this.innerProperties().withDiskUri(diskUri); return this; } @@ -193,7 +165,7 @@ public DiskInner withDiskUri(String diskUri) { * @return the storageAccountId value. */ public String storageAccountId() { - return this.storageAccountId; + return this.innerProperties() == null ? null : this.innerProperties().storageAccountId(); } /** @@ -203,7 +175,10 @@ public String storageAccountId() { * @return the DiskInner object itself. */ public DiskInner withStorageAccountId(String storageAccountId) { - this.storageAccountId = storageAccountId; + if (this.innerProperties() == null) { + this.innerProperties = new DiskProperties(); + } + this.innerProperties().withStorageAccountId(storageAccountId); return this; } @@ -213,7 +188,7 @@ public DiskInner withStorageAccountId(String storageAccountId) { * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -222,7 +197,7 @@ public OffsetDateTime createdDate() { * @return the hostCaching value. */ public String hostCaching() { - return this.hostCaching; + return this.innerProperties() == null ? null : this.innerProperties().hostCaching(); } /** @@ -232,7 +207,10 @@ public String hostCaching() { * @return the DiskInner object itself. */ public DiskInner withHostCaching(String hostCaching) { - this.hostCaching = hostCaching; + if (this.innerProperties() == null) { + this.innerProperties = new DiskProperties(); + } + this.innerProperties().withHostCaching(hostCaching); return this; } @@ -242,7 +220,7 @@ public DiskInner withHostCaching(String hostCaching) { * @return the managedDiskId value. */ public String managedDiskId() { - return this.managedDiskId; + return this.innerProperties() == null ? null : this.innerProperties().managedDiskId(); } /** @@ -252,7 +230,10 @@ public String managedDiskId() { * @return the DiskInner object itself. */ public DiskInner withManagedDiskId(String managedDiskId) { - this.managedDiskId = managedDiskId; + if (this.innerProperties() == null) { + this.innerProperties = new DiskProperties(); + } + this.innerProperties().withManagedDiskId(managedDiskId); return this; } @@ -262,7 +243,7 @@ public DiskInner withManagedDiskId(String managedDiskId) { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -271,21 +252,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public DiskInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public DiskInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -294,5 +261,14 @@ public DiskInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model DiskInner")); + } else { + innerProperties().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(DiskInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/DiskProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/DiskProperties.java new file mode 100644 index 000000000000..2f9e7a1d0251 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/DiskProperties.java @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.StorageType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Properties of a disk. */ +@Fluent +public final class DiskProperties { + /* + * The storage type for the disk (i.e. Standard, Premium). + */ + @JsonProperty(value = "diskType") + private StorageType diskType; + + /* + * The size of the disk in Gibibytes. + */ + @JsonProperty(value = "diskSizeGiB") + private Integer diskSizeGiB; + + /* + * The resource ID of the VM to which this disk is leased. + */ + @JsonProperty(value = "leasedByLabVmId") + private String leasedByLabVmId; + + /* + * When backed by a blob, the name of the VHD blob without extension. + */ + @JsonProperty(value = "diskBlobName") + private String diskBlobName; + + /* + * When backed by a blob, the URI of underlying blob. + */ + @JsonProperty(value = "diskUri") + private String diskUri; + + /* + * When backed by a blob, the storage account where the blob is. + */ + @JsonProperty(value = "storageAccountId") + private String storageAccountId; + + /* + * The creation date of the disk. + */ + @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDate; + + /* + * The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite). + */ + @JsonProperty(value = "hostCaching") + private String hostCaching; + + /* + * When backed by managed disk, this is the ID of the compute disk + * resource. + */ + @JsonProperty(value = "managedDiskId") + private String managedDiskId; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the diskType property: The storage type for the disk (i.e. Standard, Premium). + * + * @return the diskType value. + */ + public StorageType diskType() { + return this.diskType; + } + + /** + * Set the diskType property: The storage type for the disk (i.e. Standard, Premium). + * + * @param diskType the diskType value to set. + * @return the DiskProperties object itself. + */ + public DiskProperties withDiskType(StorageType diskType) { + this.diskType = diskType; + return this; + } + + /** + * Get the diskSizeGiB property: The size of the disk in Gibibytes. + * + * @return the diskSizeGiB value. + */ + public Integer diskSizeGiB() { + return this.diskSizeGiB; + } + + /** + * Set the diskSizeGiB property: The size of the disk in Gibibytes. + * + * @param diskSizeGiB the diskSizeGiB value to set. + * @return the DiskProperties object itself. + */ + public DiskProperties withDiskSizeGiB(Integer diskSizeGiB) { + this.diskSizeGiB = diskSizeGiB; + return this; + } + + /** + * Get the leasedByLabVmId property: The resource ID of the VM to which this disk is leased. + * + * @return the leasedByLabVmId value. + */ + public String leasedByLabVmId() { + return this.leasedByLabVmId; + } + + /** + * Set the leasedByLabVmId property: The resource ID of the VM to which this disk is leased. + * + * @param leasedByLabVmId the leasedByLabVmId value to set. + * @return the DiskProperties object itself. + */ + public DiskProperties withLeasedByLabVmId(String leasedByLabVmId) { + this.leasedByLabVmId = leasedByLabVmId; + return this; + } + + /** + * Get the diskBlobName property: When backed by a blob, the name of the VHD blob without extension. + * + * @return the diskBlobName value. + */ + public String diskBlobName() { + return this.diskBlobName; + } + + /** + * Set the diskBlobName property: When backed by a blob, the name of the VHD blob without extension. + * + * @param diskBlobName the diskBlobName value to set. + * @return the DiskProperties object itself. + */ + public DiskProperties withDiskBlobName(String diskBlobName) { + this.diskBlobName = diskBlobName; + return this; + } + + /** + * Get the diskUri property: When backed by a blob, the URI of underlying blob. + * + * @return the diskUri value. + */ + public String diskUri() { + return this.diskUri; + } + + /** + * Set the diskUri property: When backed by a blob, the URI of underlying blob. + * + * @param diskUri the diskUri value to set. + * @return the DiskProperties object itself. + */ + public DiskProperties withDiskUri(String diskUri) { + this.diskUri = diskUri; + return this; + } + + /** + * Get the storageAccountId property: When backed by a blob, the storage account where the blob is. + * + * @return the storageAccountId value. + */ + public String storageAccountId() { + return this.storageAccountId; + } + + /** + * Set the storageAccountId property: When backed by a blob, the storage account where the blob is. + * + * @param storageAccountId the storageAccountId value to set. + * @return the DiskProperties object itself. + */ + public DiskProperties withStorageAccountId(String storageAccountId) { + this.storageAccountId = storageAccountId; + return this; + } + + /** + * Get the createdDate property: The creation date of the disk. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Get the hostCaching property: The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite). + * + * @return the hostCaching value. + */ + public String hostCaching() { + return this.hostCaching; + } + + /** + * Set the hostCaching property: The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite). + * + * @param hostCaching the hostCaching value to set. + * @return the DiskProperties object itself. + */ + public DiskProperties withHostCaching(String hostCaching) { + this.hostCaching = hostCaching; + return this; + } + + /** + * Get the managedDiskId property: When backed by managed disk, this is the ID of the compute disk resource. + * + * @return the managedDiskId value. + */ + public String managedDiskId() { + return this.managedDiskId; + } + + /** + * Set the managedDiskId property: When backed by managed disk, this is the ID of the compute disk resource. + * + * @param managedDiskId the managedDiskId value to set. + * @return the DiskProperties object itself. + */ + public DiskProperties withManagedDiskId(String managedDiskId) { + this.managedDiskId = managedDiskId; + return this; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/DtlEnvironmentInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/DtlEnvironmentInner.java index 024dc79df197..f7defc16bb5e 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/DtlEnvironmentInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/DtlEnvironmentInner.java @@ -5,57 +5,43 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.EnvironmentDeploymentProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** An environment, which is essentially an ARM template deployment. */ -@JsonFlatten @Fluent -public class DtlEnvironmentInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DtlEnvironmentInner.class); - - /* - * The deployment properties of the environment. - */ - @JsonProperty(value = "properties.deploymentProperties") - private EnvironmentDeploymentProperties deploymentProperties; - - /* - * The display name of the Azure Resource Manager template that produced - * the environment. - */ - @JsonProperty(value = "properties.armTemplateDisplayName") - private String armTemplateDisplayName; - +public final class DtlEnvironmentInner extends Resource { /* - * The identifier of the resource group containing the environment's - * resources. + * The properties of the resource. */ - @JsonProperty(value = "properties.resourceGroupId", access = JsonProperty.Access.WRITE_ONLY) - private String resourceGroupId; + @JsonProperty(value = "properties", required = true) + private EnvironmentProperties innerProperties = new EnvironmentProperties(); - /* - * The creator of the environment. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.createdByUser", access = JsonProperty.Access.WRITE_ONLY) - private String createdByUser; + private EnvironmentProperties innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public DtlEnvironmentInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public DtlEnvironmentInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the deploymentProperties property: The deployment properties of the environment. @@ -63,7 +49,7 @@ public class DtlEnvironmentInner extends Resource { * @return the deploymentProperties value. */ public EnvironmentDeploymentProperties deploymentProperties() { - return this.deploymentProperties; + return this.innerProperties() == null ? null : this.innerProperties().deploymentProperties(); } /** @@ -73,7 +59,10 @@ public EnvironmentDeploymentProperties deploymentProperties() { * @return the DtlEnvironmentInner object itself. */ public DtlEnvironmentInner withDeploymentProperties(EnvironmentDeploymentProperties deploymentProperties) { - this.deploymentProperties = deploymentProperties; + if (this.innerProperties() == null) { + this.innerProperties = new EnvironmentProperties(); + } + this.innerProperties().withDeploymentProperties(deploymentProperties); return this; } @@ -84,7 +73,7 @@ public DtlEnvironmentInner withDeploymentProperties(EnvironmentDeploymentPropert * @return the armTemplateDisplayName value. */ public String armTemplateDisplayName() { - return this.armTemplateDisplayName; + return this.innerProperties() == null ? null : this.innerProperties().armTemplateDisplayName(); } /** @@ -95,7 +84,10 @@ public String armTemplateDisplayName() { * @return the DtlEnvironmentInner object itself. */ public DtlEnvironmentInner withArmTemplateDisplayName(String armTemplateDisplayName) { - this.armTemplateDisplayName = armTemplateDisplayName; + if (this.innerProperties() == null) { + this.innerProperties = new EnvironmentProperties(); + } + this.innerProperties().withArmTemplateDisplayName(armTemplateDisplayName); return this; } @@ -105,7 +97,7 @@ public DtlEnvironmentInner withArmTemplateDisplayName(String armTemplateDisplayN * @return the resourceGroupId value. */ public String resourceGroupId() { - return this.resourceGroupId; + return this.innerProperties() == null ? null : this.innerProperties().resourceGroupId(); } /** @@ -114,7 +106,7 @@ public String resourceGroupId() { * @return the createdByUser value. */ public String createdByUser() { - return this.createdByUser; + return this.innerProperties() == null ? null : this.innerProperties().createdByUser(); } /** @@ -123,7 +115,7 @@ public String createdByUser() { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -132,21 +124,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public DtlEnvironmentInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public DtlEnvironmentInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -155,8 +133,15 @@ public DtlEnvironmentInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (deploymentProperties() != null) { - deploymentProperties().validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model DtlEnvironmentInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(DtlEnvironmentInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/EnvironmentProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/EnvironmentProperties.java new file mode 100644 index 000000000000..08e8f9a1a1aa --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/EnvironmentProperties.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.EnvironmentDeploymentProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of an environment. */ +@Fluent +public final class EnvironmentProperties { + /* + * The deployment properties of the environment. + */ + @JsonProperty(value = "deploymentProperties") + private EnvironmentDeploymentProperties deploymentProperties; + + /* + * The display name of the Azure Resource Manager template that produced + * the environment. + */ + @JsonProperty(value = "armTemplateDisplayName") + private String armTemplateDisplayName; + + /* + * The identifier of the resource group containing the environment's + * resources. + */ + @JsonProperty(value = "resourceGroupId", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroupId; + + /* + * The creator of the environment. + */ + @JsonProperty(value = "createdByUser", access = JsonProperty.Access.WRITE_ONLY) + private String createdByUser; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the deploymentProperties property: The deployment properties of the environment. + * + * @return the deploymentProperties value. + */ + public EnvironmentDeploymentProperties deploymentProperties() { + return this.deploymentProperties; + } + + /** + * Set the deploymentProperties property: The deployment properties of the environment. + * + * @param deploymentProperties the deploymentProperties value to set. + * @return the EnvironmentProperties object itself. + */ + public EnvironmentProperties withDeploymentProperties(EnvironmentDeploymentProperties deploymentProperties) { + this.deploymentProperties = deploymentProperties; + return this; + } + + /** + * Get the armTemplateDisplayName property: The display name of the Azure Resource Manager template that produced + * the environment. + * + * @return the armTemplateDisplayName value. + */ + public String armTemplateDisplayName() { + return this.armTemplateDisplayName; + } + + /** + * Set the armTemplateDisplayName property: The display name of the Azure Resource Manager template that produced + * the environment. + * + * @param armTemplateDisplayName the armTemplateDisplayName value to set. + * @return the EnvironmentProperties object itself. + */ + public EnvironmentProperties withArmTemplateDisplayName(String armTemplateDisplayName) { + this.armTemplateDisplayName = armTemplateDisplayName; + return this; + } + + /** + * Get the resourceGroupId property: The identifier of the resource group containing the environment's resources. + * + * @return the resourceGroupId value. + */ + public String resourceGroupId() { + return this.resourceGroupId; + } + + /** + * Get the createdByUser property: The creator of the environment. + * + * @return the createdByUser value. + */ + public String createdByUser() { + return this.createdByUser; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (deploymentProperties() != null) { + deploymentProperties().validate(); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/EvaluatePoliciesResponseInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/EvaluatePoliciesResponseInner.java index 0c048e7821f4..cb03db0cd9e8 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/EvaluatePoliciesResponseInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/EvaluatePoliciesResponseInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.PolicySetResult; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response body for evaluating a policy set. */ @Fluent public final class EvaluatePoliciesResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EvaluatePoliciesResponseInner.class); - /* * Results of evaluating a policy set. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/FormulaInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/FormulaInner.java index 6d92f275805c..e0969a2c532b 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/FormulaInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/FormulaInner.java @@ -5,69 +5,45 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.FormulaPropertiesFromVm; import com.azure.resourcemanager.devtestlabs.models.LabVirtualMachineCreationParameter; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.Map; /** A formula for creating a VM, specifying an image base and other parameters. */ -@JsonFlatten @Fluent -public class FormulaInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FormulaInner.class); - - /* - * The description of the formula. - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * The author of the formula. - */ - @JsonProperty(value = "properties.author", access = JsonProperty.Access.WRITE_ONLY) - private String author; - +public final class FormulaInner extends Resource { /* - * The OS type of the formula. + * The properties of the resource. */ - @JsonProperty(value = "properties.osType") - private String osType; + @JsonProperty(value = "properties", required = true) + private FormulaProperties innerProperties = new FormulaProperties(); - /* - * The creation date of the formula. - */ - @JsonProperty(value = "properties.creationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationDate; - - /* - * The content of the formula. - */ - @JsonProperty(value = "properties.formulaContent") - private LabVirtualMachineCreationParameter formulaContent; - - /* - * Information about a VM from which a formula is to be created. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.vm") - private FormulaPropertiesFromVm vm; + private FormulaProperties innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public FormulaInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public FormulaInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the description property: The description of the formula. @@ -75,7 +51,7 @@ public class FormulaInner extends Resource { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -85,7 +61,10 @@ public String description() { * @return the FormulaInner object itself. */ public FormulaInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new FormulaProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -95,7 +74,7 @@ public FormulaInner withDescription(String description) { * @return the author value. */ public String author() { - return this.author; + return this.innerProperties() == null ? null : this.innerProperties().author(); } /** @@ -104,7 +83,7 @@ public String author() { * @return the osType value. */ public String osType() { - return this.osType; + return this.innerProperties() == null ? null : this.innerProperties().osType(); } /** @@ -114,7 +93,10 @@ public String osType() { * @return the FormulaInner object itself. */ public FormulaInner withOsType(String osType) { - this.osType = osType; + if (this.innerProperties() == null) { + this.innerProperties = new FormulaProperties(); + } + this.innerProperties().withOsType(osType); return this; } @@ -124,7 +106,7 @@ public FormulaInner withOsType(String osType) { * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.creationDate; + return this.innerProperties() == null ? null : this.innerProperties().creationDate(); } /** @@ -133,7 +115,7 @@ public OffsetDateTime creationDate() { * @return the formulaContent value. */ public LabVirtualMachineCreationParameter formulaContent() { - return this.formulaContent; + return this.innerProperties() == null ? null : this.innerProperties().formulaContent(); } /** @@ -143,7 +125,10 @@ public LabVirtualMachineCreationParameter formulaContent() { * @return the FormulaInner object itself. */ public FormulaInner withFormulaContent(LabVirtualMachineCreationParameter formulaContent) { - this.formulaContent = formulaContent; + if (this.innerProperties() == null) { + this.innerProperties = new FormulaProperties(); + } + this.innerProperties().withFormulaContent(formulaContent); return this; } @@ -153,7 +138,7 @@ public FormulaInner withFormulaContent(LabVirtualMachineCreationParameter formul * @return the vm value. */ public FormulaPropertiesFromVm vm() { - return this.vm; + return this.innerProperties() == null ? null : this.innerProperties().vm(); } /** @@ -163,7 +148,10 @@ public FormulaPropertiesFromVm vm() { * @return the FormulaInner object itself. */ public FormulaInner withVm(FormulaPropertiesFromVm vm) { - this.vm = vm; + if (this.innerProperties() == null) { + this.innerProperties = new FormulaProperties(); + } + this.innerProperties().withVm(vm); return this; } @@ -173,7 +161,7 @@ public FormulaInner withVm(FormulaPropertiesFromVm vm) { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -182,21 +170,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public FormulaInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public FormulaInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -205,11 +179,14 @@ public FormulaInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (formulaContent() != null) { - formulaContent().validate(); - } - if (vm() != null) { - vm().validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model FormulaInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(FormulaInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/FormulaProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/FormulaProperties.java new file mode 100644 index 000000000000..bd80ac70c371 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/FormulaProperties.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.FormulaPropertiesFromVm; +import com.azure.resourcemanager.devtestlabs.models.LabVirtualMachineCreationParameter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Properties of a formula. */ +@Fluent +public final class FormulaProperties { + /* + * The description of the formula. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The author of the formula. + */ + @JsonProperty(value = "author", access = JsonProperty.Access.WRITE_ONLY) + private String author; + + /* + * The OS type of the formula. + */ + @JsonProperty(value = "osType") + private String osType; + + /* + * The creation date of the formula. + */ + @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationDate; + + /* + * The content of the formula. + */ + @JsonProperty(value = "formulaContent") + private LabVirtualMachineCreationParameter formulaContent; + + /* + * Information about a VM from which a formula is to be created. + */ + @JsonProperty(value = "vm") + private FormulaPropertiesFromVm vm; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the description property: The description of the formula. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the formula. + * + * @param description the description value to set. + * @return the FormulaProperties object itself. + */ + public FormulaProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the author property: The author of the formula. + * + * @return the author value. + */ + public String author() { + return this.author; + } + + /** + * Get the osType property: The OS type of the formula. + * + * @return the osType value. + */ + public String osType() { + return this.osType; + } + + /** + * Set the osType property: The OS type of the formula. + * + * @param osType the osType value to set. + * @return the FormulaProperties object itself. + */ + public FormulaProperties withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the creationDate property: The creation date of the formula. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the formulaContent property: The content of the formula. + * + * @return the formulaContent value. + */ + public LabVirtualMachineCreationParameter formulaContent() { + return this.formulaContent; + } + + /** + * Set the formulaContent property: The content of the formula. + * + * @param formulaContent the formulaContent value to set. + * @return the FormulaProperties object itself. + */ + public FormulaProperties withFormulaContent(LabVirtualMachineCreationParameter formulaContent) { + this.formulaContent = formulaContent; + return this; + } + + /** + * Get the vm property: Information about a VM from which a formula is to be created. + * + * @return the vm value. + */ + public FormulaPropertiesFromVm vm() { + return this.vm; + } + + /** + * Set the vm property: Information about a VM from which a formula is to be created. + * + * @param vm the vm value to set. + * @return the FormulaProperties object itself. + */ + public FormulaProperties withVm(FormulaPropertiesFromVm vm) { + this.vm = vm; + return this; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (formulaContent() != null) { + formulaContent().validate(); + } + if (vm() != null) { + vm().validate(); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/GalleryImageInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/GalleryImageInner.java index 3c8655bfdb48..6d74476e20a5 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/GalleryImageInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/GalleryImageInner.java @@ -5,68 +5,44 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.GalleryImageReference; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.Map; /** A gallery image. */ -@JsonFlatten @Fluent -public class GalleryImageInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GalleryImageInner.class); - - /* - * The author of the gallery image. - */ - @JsonProperty(value = "properties.author") - private String author; - - /* - * The creation date of the gallery image. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDate; - +public final class GalleryImageInner extends Resource { /* - * The description of the gallery image. + * The properties of the resource. */ - @JsonProperty(value = "properties.description") - private String description; + @JsonProperty(value = "properties", required = true) + private GalleryImageProperties innerProperties = new GalleryImageProperties(); - /* - * The image reference of the gallery image. - */ - @JsonProperty(value = "properties.imageReference") - private GalleryImageReference imageReference; - - /* - * The icon of the gallery image. - */ - @JsonProperty(value = "properties.icon") - private String icon; - - /* - * Indicates whether this gallery image is enabled. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.enabled") - private Boolean enabled; + private GalleryImageProperties innerProperties() { + return this.innerProperties; + } - /* - * The third party plan that applies to this image - */ - @JsonProperty(value = "properties.planId") - private String planId; + /** {@inheritDoc} */ + @Override + public GalleryImageInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * Indicates if the plan has been authorized for programmatic deployment. - */ - @JsonProperty(value = "properties.isPlanAuthorized") - private Boolean isPlanAuthorized; + /** {@inheritDoc} */ + @Override + public GalleryImageInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the author property: The author of the gallery image. @@ -74,7 +50,7 @@ public class GalleryImageInner extends Resource { * @return the author value. */ public String author() { - return this.author; + return this.innerProperties() == null ? null : this.innerProperties().author(); } /** @@ -84,7 +60,10 @@ public String author() { * @return the GalleryImageInner object itself. */ public GalleryImageInner withAuthor(String author) { - this.author = author; + if (this.innerProperties() == null) { + this.innerProperties = new GalleryImageProperties(); + } + this.innerProperties().withAuthor(author); return this; } @@ -94,7 +73,7 @@ public GalleryImageInner withAuthor(String author) { * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -103,7 +82,7 @@ public OffsetDateTime createdDate() { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -113,7 +92,10 @@ public String description() { * @return the GalleryImageInner object itself. */ public GalleryImageInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new GalleryImageProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -123,7 +105,7 @@ public GalleryImageInner withDescription(String description) { * @return the imageReference value. */ public GalleryImageReference imageReference() { - return this.imageReference; + return this.innerProperties() == null ? null : this.innerProperties().imageReference(); } /** @@ -133,7 +115,10 @@ public GalleryImageReference imageReference() { * @return the GalleryImageInner object itself. */ public GalleryImageInner withImageReference(GalleryImageReference imageReference) { - this.imageReference = imageReference; + if (this.innerProperties() == null) { + this.innerProperties = new GalleryImageProperties(); + } + this.innerProperties().withImageReference(imageReference); return this; } @@ -143,7 +128,7 @@ public GalleryImageInner withImageReference(GalleryImageReference imageReference * @return the icon value. */ public String icon() { - return this.icon; + return this.innerProperties() == null ? null : this.innerProperties().icon(); } /** @@ -153,7 +138,10 @@ public String icon() { * @return the GalleryImageInner object itself. */ public GalleryImageInner withIcon(String icon) { - this.icon = icon; + if (this.innerProperties() == null) { + this.innerProperties = new GalleryImageProperties(); + } + this.innerProperties().withIcon(icon); return this; } @@ -163,7 +151,7 @@ public GalleryImageInner withIcon(String icon) { * @return the enabled value. */ public Boolean enabled() { - return this.enabled; + return this.innerProperties() == null ? null : this.innerProperties().enabled(); } /** @@ -173,7 +161,10 @@ public Boolean enabled() { * @return the GalleryImageInner object itself. */ public GalleryImageInner withEnabled(Boolean enabled) { - this.enabled = enabled; + if (this.innerProperties() == null) { + this.innerProperties = new GalleryImageProperties(); + } + this.innerProperties().withEnabled(enabled); return this; } @@ -183,7 +174,7 @@ public GalleryImageInner withEnabled(Boolean enabled) { * @return the planId value. */ public String planId() { - return this.planId; + return this.innerProperties() == null ? null : this.innerProperties().planId(); } /** @@ -193,7 +184,10 @@ public String planId() { * @return the GalleryImageInner object itself. */ public GalleryImageInner withPlanId(String planId) { - this.planId = planId; + if (this.innerProperties() == null) { + this.innerProperties = new GalleryImageProperties(); + } + this.innerProperties().withPlanId(planId); return this; } @@ -203,7 +197,7 @@ public GalleryImageInner withPlanId(String planId) { * @return the isPlanAuthorized value. */ public Boolean isPlanAuthorized() { - return this.isPlanAuthorized; + return this.innerProperties() == null ? null : this.innerProperties().isPlanAuthorized(); } /** @@ -213,21 +207,10 @@ public Boolean isPlanAuthorized() { * @return the GalleryImageInner object itself. */ public GalleryImageInner withIsPlanAuthorized(Boolean isPlanAuthorized) { - this.isPlanAuthorized = isPlanAuthorized; - return this; - } - - /** {@inheritDoc} */ - @Override - public GalleryImageInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public GalleryImageInner withTags(Map tags) { - super.withTags(tags); + if (this.innerProperties() == null) { + this.innerProperties = new GalleryImageProperties(); + } + this.innerProperties().withIsPlanAuthorized(isPlanAuthorized); return this; } @@ -237,8 +220,15 @@ public GalleryImageInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (imageReference() != null) { - imageReference().validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model GalleryImageInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(GalleryImageInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/GalleryImageProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/GalleryImageProperties.java new file mode 100644 index 000000000000..b08e53a12de1 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/GalleryImageProperties.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.GalleryImageReference; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Properties of a gallery image. */ +@Fluent +public final class GalleryImageProperties { + /* + * The author of the gallery image. + */ + @JsonProperty(value = "author") + private String author; + + /* + * The creation date of the gallery image. + */ + @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDate; + + /* + * The description of the gallery image. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The image reference of the gallery image. + */ + @JsonProperty(value = "imageReference") + private GalleryImageReference imageReference; + + /* + * The icon of the gallery image. + */ + @JsonProperty(value = "icon") + private String icon; + + /* + * Indicates whether this gallery image is enabled. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The third party plan that applies to this image + */ + @JsonProperty(value = "planId") + private String planId; + + /* + * Indicates if the plan has been authorized for programmatic deployment. + */ + @JsonProperty(value = "isPlanAuthorized") + private Boolean isPlanAuthorized; + + /** + * Get the author property: The author of the gallery image. + * + * @return the author value. + */ + public String author() { + return this.author; + } + + /** + * Set the author property: The author of the gallery image. + * + * @param author the author value to set. + * @return the GalleryImageProperties object itself. + */ + public GalleryImageProperties withAuthor(String author) { + this.author = author; + return this; + } + + /** + * Get the createdDate property: The creation date of the gallery image. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Get the description property: The description of the gallery image. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the gallery image. + * + * @param description the description value to set. + * @return the GalleryImageProperties object itself. + */ + public GalleryImageProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the imageReference property: The image reference of the gallery image. + * + * @return the imageReference value. + */ + public GalleryImageReference imageReference() { + return this.imageReference; + } + + /** + * Set the imageReference property: The image reference of the gallery image. + * + * @param imageReference the imageReference value to set. + * @return the GalleryImageProperties object itself. + */ + public GalleryImageProperties withImageReference(GalleryImageReference imageReference) { + this.imageReference = imageReference; + return this; + } + + /** + * Get the icon property: The icon of the gallery image. + * + * @return the icon value. + */ + public String icon() { + return this.icon; + } + + /** + * Set the icon property: The icon of the gallery image. + * + * @param icon the icon value to set. + * @return the GalleryImageProperties object itself. + */ + public GalleryImageProperties withIcon(String icon) { + this.icon = icon; + return this; + } + + /** + * Get the enabled property: Indicates whether this gallery image is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether this gallery image is enabled. + * + * @param enabled the enabled value to set. + * @return the GalleryImageProperties object itself. + */ + public GalleryImageProperties withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the planId property: The third party plan that applies to this image. + * + * @return the planId value. + */ + public String planId() { + return this.planId; + } + + /** + * Set the planId property: The third party plan that applies to this image. + * + * @param planId the planId value to set. + * @return the GalleryImageProperties object itself. + */ + public GalleryImageProperties withPlanId(String planId) { + this.planId = planId; + return this; + } + + /** + * Get the isPlanAuthorized property: Indicates if the plan has been authorized for programmatic deployment. + * + * @return the isPlanAuthorized value. + */ + public Boolean isPlanAuthorized() { + return this.isPlanAuthorized; + } + + /** + * Set the isPlanAuthorized property: Indicates if the plan has been authorized for programmatic deployment. + * + * @param isPlanAuthorized the isPlanAuthorized value to set. + * @return the GalleryImageProperties object itself. + */ + public GalleryImageProperties withIsPlanAuthorized(Boolean isPlanAuthorized) { + this.isPlanAuthorized = isPlanAuthorized; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (imageReference() != null) { + imageReference().validate(); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/GenerateUploadUriResponseInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/GenerateUploadUriResponseInner.java index 2a7b846f654c..bfd94862725d 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/GenerateUploadUriResponseInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/GenerateUploadUriResponseInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Response body for generating an upload URI. */ @Fluent public final class GenerateUploadUriResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GenerateUploadUriResponseInner.class); - /* * The upload URI for the VHD. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabCostInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabCostInner.java index 21455ba7d8d2..bf27a267a873 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabCostInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabCostInner.java @@ -5,84 +5,48 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.LabCostDetailsProperties; import com.azure.resourcemanager.devtestlabs.models.LabCostSummaryProperties; import com.azure.resourcemanager.devtestlabs.models.LabResourceCostProperties; import com.azure.resourcemanager.devtestlabs.models.TargetCostProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** A cost item. */ -@JsonFlatten @Fluent -public class LabCostInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabCostInner.class); - - /* - * The target cost properties - */ - @JsonProperty(value = "properties.targetCost") - private TargetCostProperties targetCost; - - /* - * The lab cost summary component of the cost data. - */ - @JsonProperty(value = "properties.labCostSummary", access = JsonProperty.Access.WRITE_ONLY) - private LabCostSummaryProperties labCostSummary; - - /* - * The lab cost details component of the cost data. - */ - @JsonProperty(value = "properties.labCostDetails", access = JsonProperty.Access.WRITE_ONLY) - private List labCostDetails; - - /* - * The resource cost component of the cost data. - */ - @JsonProperty(value = "properties.resourceCosts", access = JsonProperty.Access.WRITE_ONLY) - private List resourceCosts; - - /* - * The currency code of the cost. - */ - @JsonProperty(value = "properties.currencyCode") - private String currencyCode; - +public final class LabCostInner extends Resource { /* - * The start time of the cost data. + * The properties of the resource. */ - @JsonProperty(value = "properties.startDateTime") - private OffsetDateTime startDateTime; + @JsonProperty(value = "properties", required = true) + private LabCostProperties innerProperties = new LabCostProperties(); - /* - * The end time of the cost data. - */ - @JsonProperty(value = "properties.endDateTime") - private OffsetDateTime endDateTime; - - /* - * The creation date of the cost. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.createdDate") - private OffsetDateTime createdDate; + private LabCostProperties innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public LabCostInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public LabCostInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the targetCost property: The target cost properties. @@ -90,7 +54,7 @@ public class LabCostInner extends Resource { * @return the targetCost value. */ public TargetCostProperties targetCost() { - return this.targetCost; + return this.innerProperties() == null ? null : this.innerProperties().targetCost(); } /** @@ -100,7 +64,10 @@ public TargetCostProperties targetCost() { * @return the LabCostInner object itself. */ public LabCostInner withTargetCost(TargetCostProperties targetCost) { - this.targetCost = targetCost; + if (this.innerProperties() == null) { + this.innerProperties = new LabCostProperties(); + } + this.innerProperties().withTargetCost(targetCost); return this; } @@ -110,7 +77,7 @@ public LabCostInner withTargetCost(TargetCostProperties targetCost) { * @return the labCostSummary value. */ public LabCostSummaryProperties labCostSummary() { - return this.labCostSummary; + return this.innerProperties() == null ? null : this.innerProperties().labCostSummary(); } /** @@ -119,7 +86,7 @@ public LabCostSummaryProperties labCostSummary() { * @return the labCostDetails value. */ public List labCostDetails() { - return this.labCostDetails; + return this.innerProperties() == null ? null : this.innerProperties().labCostDetails(); } /** @@ -128,7 +95,7 @@ public List labCostDetails() { * @return the resourceCosts value. */ public List resourceCosts() { - return this.resourceCosts; + return this.innerProperties() == null ? null : this.innerProperties().resourceCosts(); } /** @@ -137,7 +104,7 @@ public List resourceCosts() { * @return the currencyCode value. */ public String currencyCode() { - return this.currencyCode; + return this.innerProperties() == null ? null : this.innerProperties().currencyCode(); } /** @@ -147,7 +114,10 @@ public String currencyCode() { * @return the LabCostInner object itself. */ public LabCostInner withCurrencyCode(String currencyCode) { - this.currencyCode = currencyCode; + if (this.innerProperties() == null) { + this.innerProperties = new LabCostProperties(); + } + this.innerProperties().withCurrencyCode(currencyCode); return this; } @@ -157,7 +127,7 @@ public LabCostInner withCurrencyCode(String currencyCode) { * @return the startDateTime value. */ public OffsetDateTime startDateTime() { - return this.startDateTime; + return this.innerProperties() == null ? null : this.innerProperties().startDateTime(); } /** @@ -167,7 +137,10 @@ public OffsetDateTime startDateTime() { * @return the LabCostInner object itself. */ public LabCostInner withStartDateTime(OffsetDateTime startDateTime) { - this.startDateTime = startDateTime; + if (this.innerProperties() == null) { + this.innerProperties = new LabCostProperties(); + } + this.innerProperties().withStartDateTime(startDateTime); return this; } @@ -177,7 +150,7 @@ public LabCostInner withStartDateTime(OffsetDateTime startDateTime) { * @return the endDateTime value. */ public OffsetDateTime endDateTime() { - return this.endDateTime; + return this.innerProperties() == null ? null : this.innerProperties().endDateTime(); } /** @@ -187,7 +160,10 @@ public OffsetDateTime endDateTime() { * @return the LabCostInner object itself. */ public LabCostInner withEndDateTime(OffsetDateTime endDateTime) { - this.endDateTime = endDateTime; + if (this.innerProperties() == null) { + this.innerProperties = new LabCostProperties(); + } + this.innerProperties().withEndDateTime(endDateTime); return this; } @@ -197,7 +173,7 @@ public LabCostInner withEndDateTime(OffsetDateTime endDateTime) { * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -207,7 +183,10 @@ public OffsetDateTime createdDate() { * @return the LabCostInner object itself. */ public LabCostInner withCreatedDate(OffsetDateTime createdDate) { - this.createdDate = createdDate; + if (this.innerProperties() == null) { + this.innerProperties = new LabCostProperties(); + } + this.innerProperties().withCreatedDate(createdDate); return this; } @@ -217,7 +196,7 @@ public LabCostInner withCreatedDate(OffsetDateTime createdDate) { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -226,21 +205,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public LabCostInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public LabCostInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -249,17 +214,14 @@ public LabCostInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (targetCost() != null) { - targetCost().validate(); - } - if (labCostSummary() != null) { - labCostSummary().validate(); - } - if (labCostDetails() != null) { - labCostDetails().forEach(e -> e.validate()); - } - if (resourceCosts() != null) { - resourceCosts().forEach(e -> e.validate()); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model LabCostInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(LabCostInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabCostProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabCostProperties.java new file mode 100644 index 000000000000..3aae1e700aaa --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabCostProperties.java @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.LabCostDetailsProperties; +import com.azure.resourcemanager.devtestlabs.models.LabCostSummaryProperties; +import com.azure.resourcemanager.devtestlabs.models.LabResourceCostProperties; +import com.azure.resourcemanager.devtestlabs.models.TargetCostProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Properties of a cost item. */ +@Fluent +public final class LabCostProperties { + /* + * The target cost properties + */ + @JsonProperty(value = "targetCost") + private TargetCostProperties targetCost; + + /* + * The lab cost summary component of the cost data. + */ + @JsonProperty(value = "labCostSummary", access = JsonProperty.Access.WRITE_ONLY) + private LabCostSummaryProperties labCostSummary; + + /* + * The lab cost details component of the cost data. + */ + @JsonProperty(value = "labCostDetails", access = JsonProperty.Access.WRITE_ONLY) + private List labCostDetails; + + /* + * The resource cost component of the cost data. + */ + @JsonProperty(value = "resourceCosts", access = JsonProperty.Access.WRITE_ONLY) + private List resourceCosts; + + /* + * The currency code of the cost. + */ + @JsonProperty(value = "currencyCode") + private String currencyCode; + + /* + * The start time of the cost data. + */ + @JsonProperty(value = "startDateTime") + private OffsetDateTime startDateTime; + + /* + * The end time of the cost data. + */ + @JsonProperty(value = "endDateTime") + private OffsetDateTime endDateTime; + + /* + * The creation date of the cost. + */ + @JsonProperty(value = "createdDate") + private OffsetDateTime createdDate; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the targetCost property: The target cost properties. + * + * @return the targetCost value. + */ + public TargetCostProperties targetCost() { + return this.targetCost; + } + + /** + * Set the targetCost property: The target cost properties. + * + * @param targetCost the targetCost value to set. + * @return the LabCostProperties object itself. + */ + public LabCostProperties withTargetCost(TargetCostProperties targetCost) { + this.targetCost = targetCost; + return this; + } + + /** + * Get the labCostSummary property: The lab cost summary component of the cost data. + * + * @return the labCostSummary value. + */ + public LabCostSummaryProperties labCostSummary() { + return this.labCostSummary; + } + + /** + * Get the labCostDetails property: The lab cost details component of the cost data. + * + * @return the labCostDetails value. + */ + public List labCostDetails() { + return this.labCostDetails; + } + + /** + * Get the resourceCosts property: The resource cost component of the cost data. + * + * @return the resourceCosts value. + */ + public List resourceCosts() { + return this.resourceCosts; + } + + /** + * Get the currencyCode property: The currency code of the cost. + * + * @return the currencyCode value. + */ + public String currencyCode() { + return this.currencyCode; + } + + /** + * Set the currencyCode property: The currency code of the cost. + * + * @param currencyCode the currencyCode value to set. + * @return the LabCostProperties object itself. + */ + public LabCostProperties withCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * Get the startDateTime property: The start time of the cost data. + * + * @return the startDateTime value. + */ + public OffsetDateTime startDateTime() { + return this.startDateTime; + } + + /** + * Set the startDateTime property: The start time of the cost data. + * + * @param startDateTime the startDateTime value to set. + * @return the LabCostProperties object itself. + */ + public LabCostProperties withStartDateTime(OffsetDateTime startDateTime) { + this.startDateTime = startDateTime; + return this; + } + + /** + * Get the endDateTime property: The end time of the cost data. + * + * @return the endDateTime value. + */ + public OffsetDateTime endDateTime() { + return this.endDateTime; + } + + /** + * Set the endDateTime property: The end time of the cost data. + * + * @param endDateTime the endDateTime value to set. + * @return the LabCostProperties object itself. + */ + public LabCostProperties withEndDateTime(OffsetDateTime endDateTime) { + this.endDateTime = endDateTime; + return this; + } + + /** + * Get the createdDate property: The creation date of the cost. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Set the createdDate property: The creation date of the cost. + * + * @param createdDate the createdDate value to set. + * @return the LabCostProperties object itself. + */ + public LabCostProperties withCreatedDate(OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (targetCost() != null) { + targetCost().validate(); + } + if (labCostSummary() != null) { + labCostSummary().validate(); + } + if (labCostDetails() != null) { + labCostDetails().forEach(e -> e.validate()); + } + if (resourceCosts() != null) { + resourceCosts().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabInner.java index f69209b3665a..f4579bca2352 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabInner.java @@ -5,158 +5,48 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.EnvironmentPermission; import com.azure.resourcemanager.devtestlabs.models.LabAnnouncementProperties; import com.azure.resourcemanager.devtestlabs.models.LabSupportProperties; import com.azure.resourcemanager.devtestlabs.models.PremiumDataDisk; import com.azure.resourcemanager.devtestlabs.models.StorageType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** A lab. */ -@JsonFlatten @Fluent -public class LabInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabInner.class); - - /* - * The lab's default storage account. - */ - @JsonProperty(value = "properties.defaultStorageAccount", access = JsonProperty.Access.WRITE_ONLY) - private String defaultStorageAccount; - - /* - * The lab's default premium storage account. - */ - @JsonProperty(value = "properties.defaultPremiumStorageAccount", access = JsonProperty.Access.WRITE_ONLY) - private String defaultPremiumStorageAccount; - - /* - * The lab's artifact storage account. - */ - @JsonProperty(value = "properties.artifactsStorageAccount", access = JsonProperty.Access.WRITE_ONLY) - private String artifactsStorageAccount; - - /* - * The lab's premium data disk storage account. - */ - @JsonProperty(value = "properties.premiumDataDiskStorageAccount", access = JsonProperty.Access.WRITE_ONLY) - private String premiumDataDiskStorageAccount; - - /* - * The lab's Key vault. - */ - @JsonProperty(value = "properties.vaultName", access = JsonProperty.Access.WRITE_ONLY) - private String vaultName; - - /* - * Type of storage used by the lab. It can be either Premium or Standard. - * Default is Premium. - */ - @JsonProperty(value = "properties.labStorageType") - private StorageType labStorageType; - - /* - * The ordered list of artifact resource IDs that should be applied on all - * Linux VM creations by default, prior to the artifacts specified by the - * user. - */ - @JsonProperty(value = "properties.mandatoryArtifactsResourceIdsLinux") - private List mandatoryArtifactsResourceIdsLinux; - +public final class LabInner extends Resource { /* - * The ordered list of artifact resource IDs that should be applied on all - * Windows VM creations by default, prior to the artifacts specified by the - * user. + * The properties of the resource. */ - @JsonProperty(value = "properties.mandatoryArtifactsResourceIdsWindows") - private List mandatoryArtifactsResourceIdsWindows; + @JsonProperty(value = "properties") + private LabProperties innerProperties; - /* - * The creation date of the lab. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDate; - - /* - * The setting to enable usage of premium data disks. - * When its value is 'Enabled', creation of standard or premium data disks - * is allowed. - * When its value is 'Disabled', only creation of standard data disks is - * allowed. - */ - @JsonProperty(value = "properties.premiumDataDisks") - private PremiumDataDisk premiumDataDisks; - - /* - * The access rights to be granted to the user when provisioning an - * environment - */ - @JsonProperty(value = "properties.environmentPermission") - private EnvironmentPermission environmentPermission; - - /* - * The properties of any lab announcement associated with this lab - */ - @JsonProperty(value = "properties.announcement") - private LabAnnouncementProperties announcement; - - /* - * The properties of any lab support message associated with this lab - */ - @JsonProperty(value = "properties.support") - private LabSupportProperties support; - - /* - * The resource group in which all new lab virtual machines will be - * created. To let DevTest Labs manage resource group creation, set this - * value to null. - */ - @JsonProperty(value = "properties.vmCreationResourceGroup", access = JsonProperty.Access.WRITE_ONLY) - private String vmCreationResourceGroup; - - /* - * The public IP address for the lab's load balancer. - */ - @JsonProperty(value = "properties.publicIpId", access = JsonProperty.Access.WRITE_ONLY) - private String publicIpId; - - /* - * The load balancer used to for lab VMs that use shared IP address. - */ - @JsonProperty(value = "properties.loadBalancerId", access = JsonProperty.Access.WRITE_ONLY) - private String loadBalancerId; - - /* - * The Network Security Group attached to the lab VMs Network interfaces to - * restrict open ports. - */ - @JsonProperty(value = "properties.networkSecurityGroupId", access = JsonProperty.Access.WRITE_ONLY) - private String networkSecurityGroupId; - - /* - * Extended properties of the lab used for experimental features + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.extendedProperties") - private Map extendedProperties; + private LabProperties innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public LabInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public LabInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the defaultStorageAccount property: The lab's default storage account. @@ -164,7 +54,7 @@ public class LabInner extends Resource { * @return the defaultStorageAccount value. */ public String defaultStorageAccount() { - return this.defaultStorageAccount; + return this.innerProperties() == null ? null : this.innerProperties().defaultStorageAccount(); } /** @@ -173,7 +63,7 @@ public String defaultStorageAccount() { * @return the defaultPremiumStorageAccount value. */ public String defaultPremiumStorageAccount() { - return this.defaultPremiumStorageAccount; + return this.innerProperties() == null ? null : this.innerProperties().defaultPremiumStorageAccount(); } /** @@ -182,7 +72,7 @@ public String defaultPremiumStorageAccount() { * @return the artifactsStorageAccount value. */ public String artifactsStorageAccount() { - return this.artifactsStorageAccount; + return this.innerProperties() == null ? null : this.innerProperties().artifactsStorageAccount(); } /** @@ -191,7 +81,7 @@ public String artifactsStorageAccount() { * @return the premiumDataDiskStorageAccount value. */ public String premiumDataDiskStorageAccount() { - return this.premiumDataDiskStorageAccount; + return this.innerProperties() == null ? null : this.innerProperties().premiumDataDiskStorageAccount(); } /** @@ -200,7 +90,7 @@ public String premiumDataDiskStorageAccount() { * @return the vaultName value. */ public String vaultName() { - return this.vaultName; + return this.innerProperties() == null ? null : this.innerProperties().vaultName(); } /** @@ -210,7 +100,7 @@ public String vaultName() { * @return the labStorageType value. */ public StorageType labStorageType() { - return this.labStorageType; + return this.innerProperties() == null ? null : this.innerProperties().labStorageType(); } /** @@ -221,7 +111,10 @@ public StorageType labStorageType() { * @return the LabInner object itself. */ public LabInner withLabStorageType(StorageType labStorageType) { - this.labStorageType = labStorageType; + if (this.innerProperties() == null) { + this.innerProperties = new LabProperties(); + } + this.innerProperties().withLabStorageType(labStorageType); return this; } @@ -232,7 +125,7 @@ public LabInner withLabStorageType(StorageType labStorageType) { * @return the mandatoryArtifactsResourceIdsLinux value. */ public List mandatoryArtifactsResourceIdsLinux() { - return this.mandatoryArtifactsResourceIdsLinux; + return this.innerProperties() == null ? null : this.innerProperties().mandatoryArtifactsResourceIdsLinux(); } /** @@ -243,7 +136,10 @@ public List mandatoryArtifactsResourceIdsLinux() { * @return the LabInner object itself. */ public LabInner withMandatoryArtifactsResourceIdsLinux(List mandatoryArtifactsResourceIdsLinux) { - this.mandatoryArtifactsResourceIdsLinux = mandatoryArtifactsResourceIdsLinux; + if (this.innerProperties() == null) { + this.innerProperties = new LabProperties(); + } + this.innerProperties().withMandatoryArtifactsResourceIdsLinux(mandatoryArtifactsResourceIdsLinux); return this; } @@ -254,7 +150,7 @@ public LabInner withMandatoryArtifactsResourceIdsLinux(List mandatoryArt * @return the mandatoryArtifactsResourceIdsWindows value. */ public List mandatoryArtifactsResourceIdsWindows() { - return this.mandatoryArtifactsResourceIdsWindows; + return this.innerProperties() == null ? null : this.innerProperties().mandatoryArtifactsResourceIdsWindows(); } /** @@ -265,7 +161,10 @@ public List mandatoryArtifactsResourceIdsWindows() { * @return the LabInner object itself. */ public LabInner withMandatoryArtifactsResourceIdsWindows(List mandatoryArtifactsResourceIdsWindows) { - this.mandatoryArtifactsResourceIdsWindows = mandatoryArtifactsResourceIdsWindows; + if (this.innerProperties() == null) { + this.innerProperties = new LabProperties(); + } + this.innerProperties().withMandatoryArtifactsResourceIdsWindows(mandatoryArtifactsResourceIdsWindows); return this; } @@ -275,7 +174,7 @@ public LabInner withMandatoryArtifactsResourceIdsWindows(List mandatoryA * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -286,7 +185,7 @@ public OffsetDateTime createdDate() { * @return the premiumDataDisks value. */ public PremiumDataDisk premiumDataDisks() { - return this.premiumDataDisks; + return this.innerProperties() == null ? null : this.innerProperties().premiumDataDisks(); } /** @@ -298,7 +197,10 @@ public PremiumDataDisk premiumDataDisks() { * @return the LabInner object itself. */ public LabInner withPremiumDataDisks(PremiumDataDisk premiumDataDisks) { - this.premiumDataDisks = premiumDataDisks; + if (this.innerProperties() == null) { + this.innerProperties = new LabProperties(); + } + this.innerProperties().withPremiumDataDisks(premiumDataDisks); return this; } @@ -309,7 +211,7 @@ public LabInner withPremiumDataDisks(PremiumDataDisk premiumDataDisks) { * @return the environmentPermission value. */ public EnvironmentPermission environmentPermission() { - return this.environmentPermission; + return this.innerProperties() == null ? null : this.innerProperties().environmentPermission(); } /** @@ -320,7 +222,10 @@ public EnvironmentPermission environmentPermission() { * @return the LabInner object itself. */ public LabInner withEnvironmentPermission(EnvironmentPermission environmentPermission) { - this.environmentPermission = environmentPermission; + if (this.innerProperties() == null) { + this.innerProperties = new LabProperties(); + } + this.innerProperties().withEnvironmentPermission(environmentPermission); return this; } @@ -330,7 +235,7 @@ public LabInner withEnvironmentPermission(EnvironmentPermission environmentPermi * @return the announcement value. */ public LabAnnouncementProperties announcement() { - return this.announcement; + return this.innerProperties() == null ? null : this.innerProperties().announcement(); } /** @@ -340,7 +245,10 @@ public LabAnnouncementProperties announcement() { * @return the LabInner object itself. */ public LabInner withAnnouncement(LabAnnouncementProperties announcement) { - this.announcement = announcement; + if (this.innerProperties() == null) { + this.innerProperties = new LabProperties(); + } + this.innerProperties().withAnnouncement(announcement); return this; } @@ -350,7 +258,7 @@ public LabInner withAnnouncement(LabAnnouncementProperties announcement) { * @return the support value. */ public LabSupportProperties support() { - return this.support; + return this.innerProperties() == null ? null : this.innerProperties().support(); } /** @@ -360,7 +268,10 @@ public LabSupportProperties support() { * @return the LabInner object itself. */ public LabInner withSupport(LabSupportProperties support) { - this.support = support; + if (this.innerProperties() == null) { + this.innerProperties = new LabProperties(); + } + this.innerProperties().withSupport(support); return this; } @@ -371,7 +282,7 @@ public LabInner withSupport(LabSupportProperties support) { * @return the vmCreationResourceGroup value. */ public String vmCreationResourceGroup() { - return this.vmCreationResourceGroup; + return this.innerProperties() == null ? null : this.innerProperties().vmCreationResourceGroup(); } /** @@ -380,7 +291,7 @@ public String vmCreationResourceGroup() { * @return the publicIpId value. */ public String publicIpId() { - return this.publicIpId; + return this.innerProperties() == null ? null : this.innerProperties().publicIpId(); } /** @@ -389,7 +300,7 @@ public String publicIpId() { * @return the loadBalancerId value. */ public String loadBalancerId() { - return this.loadBalancerId; + return this.innerProperties() == null ? null : this.innerProperties().loadBalancerId(); } /** @@ -399,7 +310,7 @@ public String loadBalancerId() { * @return the networkSecurityGroupId value. */ public String networkSecurityGroupId() { - return this.networkSecurityGroupId; + return this.innerProperties() == null ? null : this.innerProperties().networkSecurityGroupId(); } /** @@ -408,7 +319,7 @@ public String networkSecurityGroupId() { * @return the extendedProperties value. */ public Map extendedProperties() { - return this.extendedProperties; + return this.innerProperties() == null ? null : this.innerProperties().extendedProperties(); } /** @@ -418,7 +329,10 @@ public Map extendedProperties() { * @return the LabInner object itself. */ public LabInner withExtendedProperties(Map extendedProperties) { - this.extendedProperties = extendedProperties; + if (this.innerProperties() == null) { + this.innerProperties = new LabProperties(); + } + this.innerProperties().withExtendedProperties(extendedProperties); return this; } @@ -428,7 +342,7 @@ public LabInner withExtendedProperties(Map extendedProperties) { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -437,21 +351,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public LabInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public LabInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -460,11 +360,8 @@ public LabInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (announcement() != null) { - announcement().validate(); - } - if (support() != null) { - support().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabProperties.java new file mode 100644 index 000000000000..a138cc226875 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabProperties.java @@ -0,0 +1,451 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.EnvironmentPermission; +import com.azure.resourcemanager.devtestlabs.models.LabAnnouncementProperties; +import com.azure.resourcemanager.devtestlabs.models.LabSupportProperties; +import com.azure.resourcemanager.devtestlabs.models.PremiumDataDisk; +import com.azure.resourcemanager.devtestlabs.models.StorageType; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** Properties of a lab. */ +@Fluent +public final class LabProperties { + /* + * The lab's default storage account. + */ + @JsonProperty(value = "defaultStorageAccount", access = JsonProperty.Access.WRITE_ONLY) + private String defaultStorageAccount; + + /* + * The lab's default premium storage account. + */ + @JsonProperty(value = "defaultPremiumStorageAccount", access = JsonProperty.Access.WRITE_ONLY) + private String defaultPremiumStorageAccount; + + /* + * The lab's artifact storage account. + */ + @JsonProperty(value = "artifactsStorageAccount", access = JsonProperty.Access.WRITE_ONLY) + private String artifactsStorageAccount; + + /* + * The lab's premium data disk storage account. + */ + @JsonProperty(value = "premiumDataDiskStorageAccount", access = JsonProperty.Access.WRITE_ONLY) + private String premiumDataDiskStorageAccount; + + /* + * The lab's Key vault. + */ + @JsonProperty(value = "vaultName", access = JsonProperty.Access.WRITE_ONLY) + private String vaultName; + + /* + * Type of storage used by the lab. It can be either Premium or Standard. + * Default is Premium. + */ + @JsonProperty(value = "labStorageType") + private StorageType labStorageType; + + /* + * The ordered list of artifact resource IDs that should be applied on all + * Linux VM creations by default, prior to the artifacts specified by the + * user. + */ + @JsonProperty(value = "mandatoryArtifactsResourceIdsLinux") + private List mandatoryArtifactsResourceIdsLinux; + + /* + * The ordered list of artifact resource IDs that should be applied on all + * Windows VM creations by default, prior to the artifacts specified by the + * user. + */ + @JsonProperty(value = "mandatoryArtifactsResourceIdsWindows") + private List mandatoryArtifactsResourceIdsWindows; + + /* + * The creation date of the lab. + */ + @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDate; + + /* + * The setting to enable usage of premium data disks. + * When its value is 'Enabled', creation of standard or premium data disks + * is allowed. + * When its value is 'Disabled', only creation of standard data disks is + * allowed. + */ + @JsonProperty(value = "premiumDataDisks") + private PremiumDataDisk premiumDataDisks; + + /* + * The access rights to be granted to the user when provisioning an + * environment + */ + @JsonProperty(value = "environmentPermission") + private EnvironmentPermission environmentPermission; + + /* + * The properties of any lab announcement associated with this lab + */ + @JsonProperty(value = "announcement") + private LabAnnouncementProperties announcement; + + /* + * The properties of any lab support message associated with this lab + */ + @JsonProperty(value = "support") + private LabSupportProperties support; + + /* + * The resource group in which all new lab virtual machines will be + * created. To let DevTest Labs manage resource group creation, set this + * value to null. + */ + @JsonProperty(value = "vmCreationResourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String vmCreationResourceGroup; + + /* + * The public IP address for the lab's load balancer. + */ + @JsonProperty(value = "publicIpId", access = JsonProperty.Access.WRITE_ONLY) + private String publicIpId; + + /* + * The load balancer used to for lab VMs that use shared IP address. + */ + @JsonProperty(value = "loadBalancerId", access = JsonProperty.Access.WRITE_ONLY) + private String loadBalancerId; + + /* + * The Network Security Group attached to the lab VMs Network interfaces to + * restrict open ports. + */ + @JsonProperty(value = "networkSecurityGroupId", access = JsonProperty.Access.WRITE_ONLY) + private String networkSecurityGroupId; + + /* + * Extended properties of the lab used for experimental features + */ + @JsonProperty(value = "extendedProperties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map extendedProperties; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the defaultStorageAccount property: The lab's default storage account. + * + * @return the defaultStorageAccount value. + */ + public String defaultStorageAccount() { + return this.defaultStorageAccount; + } + + /** + * Get the defaultPremiumStorageAccount property: The lab's default premium storage account. + * + * @return the defaultPremiumStorageAccount value. + */ + public String defaultPremiumStorageAccount() { + return this.defaultPremiumStorageAccount; + } + + /** + * Get the artifactsStorageAccount property: The lab's artifact storage account. + * + * @return the artifactsStorageAccount value. + */ + public String artifactsStorageAccount() { + return this.artifactsStorageAccount; + } + + /** + * Get the premiumDataDiskStorageAccount property: The lab's premium data disk storage account. + * + * @return the premiumDataDiskStorageAccount value. + */ + public String premiumDataDiskStorageAccount() { + return this.premiumDataDiskStorageAccount; + } + + /** + * Get the vaultName property: The lab's Key vault. + * + * @return the vaultName value. + */ + public String vaultName() { + return this.vaultName; + } + + /** + * Get the labStorageType property: Type of storage used by the lab. It can be either Premium or Standard. Default + * is Premium. + * + * @return the labStorageType value. + */ + public StorageType labStorageType() { + return this.labStorageType; + } + + /** + * Set the labStorageType property: Type of storage used by the lab. It can be either Premium or Standard. Default + * is Premium. + * + * @param labStorageType the labStorageType value to set. + * @return the LabProperties object itself. + */ + public LabProperties withLabStorageType(StorageType labStorageType) { + this.labStorageType = labStorageType; + return this; + } + + /** + * Get the mandatoryArtifactsResourceIdsLinux property: The ordered list of artifact resource IDs that should be + * applied on all Linux VM creations by default, prior to the artifacts specified by the user. + * + * @return the mandatoryArtifactsResourceIdsLinux value. + */ + public List mandatoryArtifactsResourceIdsLinux() { + return this.mandatoryArtifactsResourceIdsLinux; + } + + /** + * Set the mandatoryArtifactsResourceIdsLinux property: The ordered list of artifact resource IDs that should be + * applied on all Linux VM creations by default, prior to the artifacts specified by the user. + * + * @param mandatoryArtifactsResourceIdsLinux the mandatoryArtifactsResourceIdsLinux value to set. + * @return the LabProperties object itself. + */ + public LabProperties withMandatoryArtifactsResourceIdsLinux(List mandatoryArtifactsResourceIdsLinux) { + this.mandatoryArtifactsResourceIdsLinux = mandatoryArtifactsResourceIdsLinux; + return this; + } + + /** + * Get the mandatoryArtifactsResourceIdsWindows property: The ordered list of artifact resource IDs that should be + * applied on all Windows VM creations by default, prior to the artifacts specified by the user. + * + * @return the mandatoryArtifactsResourceIdsWindows value. + */ + public List mandatoryArtifactsResourceIdsWindows() { + return this.mandatoryArtifactsResourceIdsWindows; + } + + /** + * Set the mandatoryArtifactsResourceIdsWindows property: The ordered list of artifact resource IDs that should be + * applied on all Windows VM creations by default, prior to the artifacts specified by the user. + * + * @param mandatoryArtifactsResourceIdsWindows the mandatoryArtifactsResourceIdsWindows value to set. + * @return the LabProperties object itself. + */ + public LabProperties withMandatoryArtifactsResourceIdsWindows(List mandatoryArtifactsResourceIdsWindows) { + this.mandatoryArtifactsResourceIdsWindows = mandatoryArtifactsResourceIdsWindows; + return this; + } + + /** + * Get the createdDate property: The creation date of the lab. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Get the premiumDataDisks property: The setting to enable usage of premium data disks. When its value is + * 'Enabled', creation of standard or premium data disks is allowed. When its value is 'Disabled', only creation of + * standard data disks is allowed. + * + * @return the premiumDataDisks value. + */ + public PremiumDataDisk premiumDataDisks() { + return this.premiumDataDisks; + } + + /** + * Set the premiumDataDisks property: The setting to enable usage of premium data disks. When its value is + * 'Enabled', creation of standard or premium data disks is allowed. When its value is 'Disabled', only creation of + * standard data disks is allowed. + * + * @param premiumDataDisks the premiumDataDisks value to set. + * @return the LabProperties object itself. + */ + public LabProperties withPremiumDataDisks(PremiumDataDisk premiumDataDisks) { + this.premiumDataDisks = premiumDataDisks; + return this; + } + + /** + * Get the environmentPermission property: The access rights to be granted to the user when provisioning an + * environment. + * + * @return the environmentPermission value. + */ + public EnvironmentPermission environmentPermission() { + return this.environmentPermission; + } + + /** + * Set the environmentPermission property: The access rights to be granted to the user when provisioning an + * environment. + * + * @param environmentPermission the environmentPermission value to set. + * @return the LabProperties object itself. + */ + public LabProperties withEnvironmentPermission(EnvironmentPermission environmentPermission) { + this.environmentPermission = environmentPermission; + return this; + } + + /** + * Get the announcement property: The properties of any lab announcement associated with this lab. + * + * @return the announcement value. + */ + public LabAnnouncementProperties announcement() { + return this.announcement; + } + + /** + * Set the announcement property: The properties of any lab announcement associated with this lab. + * + * @param announcement the announcement value to set. + * @return the LabProperties object itself. + */ + public LabProperties withAnnouncement(LabAnnouncementProperties announcement) { + this.announcement = announcement; + return this; + } + + /** + * Get the support property: The properties of any lab support message associated with this lab. + * + * @return the support value. + */ + public LabSupportProperties support() { + return this.support; + } + + /** + * Set the support property: The properties of any lab support message associated with this lab. + * + * @param support the support value to set. + * @return the LabProperties object itself. + */ + public LabProperties withSupport(LabSupportProperties support) { + this.support = support; + return this; + } + + /** + * Get the vmCreationResourceGroup property: The resource group in which all new lab virtual machines will be + * created. To let DevTest Labs manage resource group creation, set this value to null. + * + * @return the vmCreationResourceGroup value. + */ + public String vmCreationResourceGroup() { + return this.vmCreationResourceGroup; + } + + /** + * Get the publicIpId property: The public IP address for the lab's load balancer. + * + * @return the publicIpId value. + */ + public String publicIpId() { + return this.publicIpId; + } + + /** + * Get the loadBalancerId property: The load balancer used to for lab VMs that use shared IP address. + * + * @return the loadBalancerId value. + */ + public String loadBalancerId() { + return this.loadBalancerId; + } + + /** + * Get the networkSecurityGroupId property: The Network Security Group attached to the lab VMs Network interfaces to + * restrict open ports. + * + * @return the networkSecurityGroupId value. + */ + public String networkSecurityGroupId() { + return this.networkSecurityGroupId; + } + + /** + * Get the extendedProperties property: Extended properties of the lab used for experimental features. + * + * @return the extendedProperties value. + */ + public Map extendedProperties() { + return this.extendedProperties; + } + + /** + * Set the extendedProperties property: Extended properties of the lab used for experimental features. + * + * @param extendedProperties the extendedProperties value to set. + * @return the LabProperties object itself. + */ + public LabProperties withExtendedProperties(Map extendedProperties) { + this.extendedProperties = extendedProperties; + return this; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (announcement() != null) { + announcement().validate(); + } + if (support() != null) { + support().validate(); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVhdInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVhdInner.java index e7e6ad2935c7..d0b6258fcf69 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVhdInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVhdInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a VHD in the lab. */ @Fluent public final class LabVhdInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabVhdInner.class); - /* * The URI to the VHD. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVirtualMachineCreationParameterProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVirtualMachineCreationParameterProperties.java new file mode 100644 index 000000000000..c9440fd9455b --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVirtualMachineCreationParameterProperties.java @@ -0,0 +1,684 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.ArtifactInstallProperties; +import com.azure.resourcemanager.devtestlabs.models.BulkCreationParameters; +import com.azure.resourcemanager.devtestlabs.models.DataDiskProperties; +import com.azure.resourcemanager.devtestlabs.models.GalleryImageReference; +import com.azure.resourcemanager.devtestlabs.models.NetworkInterfaceProperties; +import com.azure.resourcemanager.devtestlabs.models.ScheduleCreationParameter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Properties for virtual machine creation. */ +@Fluent +public final class LabVirtualMachineCreationParameterProperties { + /* + * The number of virtual machine instances to create. + */ + @JsonProperty(value = "bulkCreationParameters") + private BulkCreationParameters bulkCreationParameters; + + /* + * The notes of the virtual machine. + */ + @JsonProperty(value = "notes") + private String notes; + + /* + * The object identifier of the owner of the virtual machine. + */ + @JsonProperty(value = "ownerObjectId") + private String ownerObjectId; + + /* + * The user principal name of the virtual machine owner. + */ + @JsonProperty(value = "ownerUserPrincipalName") + private String ownerUserPrincipalName; + + /* + * The creation date of the virtual machine. + */ + @JsonProperty(value = "createdDate") + private OffsetDateTime createdDate; + + /* + * The custom image identifier of the virtual machine. + */ + @JsonProperty(value = "customImageId") + private String customImageId; + + /* + * The size of the virtual machine. + */ + @JsonProperty(value = "size") + private String size; + + /* + * The user name of the virtual machine. + */ + @JsonProperty(value = "userName") + private String username; + + /* + * The password of the virtual machine administrator. + */ + @JsonProperty(value = "password") + private String password; + + /* + * The SSH key of the virtual machine administrator. + */ + @JsonProperty(value = "sshKey") + private String sshKey; + + /* + * Indicates whether this virtual machine uses an SSH key for + * authentication. + */ + @JsonProperty(value = "isAuthenticationWithSshKey") + private Boolean isAuthenticationWithSshKey; + + /* + * The lab subnet name of the virtual machine. + */ + @JsonProperty(value = "labSubnetName") + private String labSubnetName; + + /* + * The lab virtual network identifier of the virtual machine. + */ + @JsonProperty(value = "labVirtualNetworkId") + private String labVirtualNetworkId; + + /* + * Indicates whether the virtual machine is to be created without a public + * IP address. + */ + @JsonProperty(value = "disallowPublicIpAddress") + private Boolean disallowPublicIpAddress; + + /* + * The artifacts to be installed on the virtual machine. + */ + @JsonProperty(value = "artifacts") + private List artifacts; + + /* + * The Microsoft Azure Marketplace image reference of the virtual machine. + */ + @JsonProperty(value = "galleryImageReference") + private GalleryImageReference galleryImageReference; + + /* + * The id of the plan associated with the virtual machine image + */ + @JsonProperty(value = "planId") + private String planId; + + /* + * The network interface properties. + */ + @JsonProperty(value = "networkInterface") + private NetworkInterfaceProperties networkInterface; + + /* + * The expiration date for VM. + */ + @JsonProperty(value = "expirationDate") + private OffsetDateTime expirationDate; + + /* + * Indicates whether another user can take ownership of the virtual machine + */ + @JsonProperty(value = "allowClaim") + private Boolean allowClaim; + + /* + * Storage type to use for virtual machine (i.e. Standard, Premium). + */ + @JsonProperty(value = "storageType") + private String storageType; + + /* + * The resource ID of the environment that contains this virtual machine, + * if any. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /* + * New or existing data disks to attach to the virtual machine after + * creation + */ + @JsonProperty(value = "dataDiskParameters") + private List dataDiskParameters; + + /* + * Virtual Machine schedules to be created + */ + @JsonProperty(value = "scheduleParameters") + private List scheduleParameters; + + /** + * Get the bulkCreationParameters property: The number of virtual machine instances to create. + * + * @return the bulkCreationParameters value. + */ + public BulkCreationParameters bulkCreationParameters() { + return this.bulkCreationParameters; + } + + /** + * Set the bulkCreationParameters property: The number of virtual machine instances to create. + * + * @param bulkCreationParameters the bulkCreationParameters value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withBulkCreationParameters( + BulkCreationParameters bulkCreationParameters) { + this.bulkCreationParameters = bulkCreationParameters; + return this; + } + + /** + * Get the notes property: The notes of the virtual machine. + * + * @return the notes value. + */ + public String notes() { + return this.notes; + } + + /** + * Set the notes property: The notes of the virtual machine. + * + * @param notes the notes value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withNotes(String notes) { + this.notes = notes; + return this; + } + + /** + * Get the ownerObjectId property: The object identifier of the owner of the virtual machine. + * + * @return the ownerObjectId value. + */ + public String ownerObjectId() { + return this.ownerObjectId; + } + + /** + * Set the ownerObjectId property: The object identifier of the owner of the virtual machine. + * + * @param ownerObjectId the ownerObjectId value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withOwnerObjectId(String ownerObjectId) { + this.ownerObjectId = ownerObjectId; + return this; + } + + /** + * Get the ownerUserPrincipalName property: The user principal name of the virtual machine owner. + * + * @return the ownerUserPrincipalName value. + */ + public String ownerUserPrincipalName() { + return this.ownerUserPrincipalName; + } + + /** + * Set the ownerUserPrincipalName property: The user principal name of the virtual machine owner. + * + * @param ownerUserPrincipalName the ownerUserPrincipalName value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withOwnerUserPrincipalName(String ownerUserPrincipalName) { + this.ownerUserPrincipalName = ownerUserPrincipalName; + return this; + } + + /** + * Get the createdDate property: The creation date of the virtual machine. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Set the createdDate property: The creation date of the virtual machine. + * + * @param createdDate the createdDate value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withCreatedDate(OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get the customImageId property: The custom image identifier of the virtual machine. + * + * @return the customImageId value. + */ + public String customImageId() { + return this.customImageId; + } + + /** + * Set the customImageId property: The custom image identifier of the virtual machine. + * + * @param customImageId the customImageId value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withCustomImageId(String customImageId) { + this.customImageId = customImageId; + return this; + } + + /** + * Get the size property: The size of the virtual machine. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: The size of the virtual machine. + * + * @param size the size value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the username property: The user name of the virtual machine. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: The user name of the virtual machine. + * + * @param username the username value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password property: The password of the virtual machine administrator. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: The password of the virtual machine administrator. + * + * @param password the password value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the sshKey property: The SSH key of the virtual machine administrator. + * + * @return the sshKey value. + */ + public String sshKey() { + return this.sshKey; + } + + /** + * Set the sshKey property: The SSH key of the virtual machine administrator. + * + * @param sshKey the sshKey value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withSshKey(String sshKey) { + this.sshKey = sshKey; + return this; + } + + /** + * Get the isAuthenticationWithSshKey property: Indicates whether this virtual machine uses an SSH key for + * authentication. + * + * @return the isAuthenticationWithSshKey value. + */ + public Boolean isAuthenticationWithSshKey() { + return this.isAuthenticationWithSshKey; + } + + /** + * Set the isAuthenticationWithSshKey property: Indicates whether this virtual machine uses an SSH key for + * authentication. + * + * @param isAuthenticationWithSshKey the isAuthenticationWithSshKey value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withIsAuthenticationWithSshKey( + Boolean isAuthenticationWithSshKey) { + this.isAuthenticationWithSshKey = isAuthenticationWithSshKey; + return this; + } + + /** + * Get the labSubnetName property: The lab subnet name of the virtual machine. + * + * @return the labSubnetName value. + */ + public String labSubnetName() { + return this.labSubnetName; + } + + /** + * Set the labSubnetName property: The lab subnet name of the virtual machine. + * + * @param labSubnetName the labSubnetName value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withLabSubnetName(String labSubnetName) { + this.labSubnetName = labSubnetName; + return this; + } + + /** + * Get the labVirtualNetworkId property: The lab virtual network identifier of the virtual machine. + * + * @return the labVirtualNetworkId value. + */ + public String labVirtualNetworkId() { + return this.labVirtualNetworkId; + } + + /** + * Set the labVirtualNetworkId property: The lab virtual network identifier of the virtual machine. + * + * @param labVirtualNetworkId the labVirtualNetworkId value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withLabVirtualNetworkId(String labVirtualNetworkId) { + this.labVirtualNetworkId = labVirtualNetworkId; + return this; + } + + /** + * Get the disallowPublicIpAddress property: Indicates whether the virtual machine is to be created without a public + * IP address. + * + * @return the disallowPublicIpAddress value. + */ + public Boolean disallowPublicIpAddress() { + return this.disallowPublicIpAddress; + } + + /** + * Set the disallowPublicIpAddress property: Indicates whether the virtual machine is to be created without a public + * IP address. + * + * @param disallowPublicIpAddress the disallowPublicIpAddress value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withDisallowPublicIpAddress(Boolean disallowPublicIpAddress) { + this.disallowPublicIpAddress = disallowPublicIpAddress; + return this; + } + + /** + * Get the artifacts property: The artifacts to be installed on the virtual machine. + * + * @return the artifacts value. + */ + public List artifacts() { + return this.artifacts; + } + + /** + * Set the artifacts property: The artifacts to be installed on the virtual machine. + * + * @param artifacts the artifacts value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withArtifacts(List artifacts) { + this.artifacts = artifacts; + return this; + } + + /** + * Get the galleryImageReference property: The Microsoft Azure Marketplace image reference of the virtual machine. + * + * @return the galleryImageReference value. + */ + public GalleryImageReference galleryImageReference() { + return this.galleryImageReference; + } + + /** + * Set the galleryImageReference property: The Microsoft Azure Marketplace image reference of the virtual machine. + * + * @param galleryImageReference the galleryImageReference value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withGalleryImageReference( + GalleryImageReference galleryImageReference) { + this.galleryImageReference = galleryImageReference; + return this; + } + + /** + * Get the planId property: The id of the plan associated with the virtual machine image. + * + * @return the planId value. + */ + public String planId() { + return this.planId; + } + + /** + * Set the planId property: The id of the plan associated with the virtual machine image. + * + * @param planId the planId value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withPlanId(String planId) { + this.planId = planId; + return this; + } + + /** + * Get the networkInterface property: The network interface properties. + * + * @return the networkInterface value. + */ + public NetworkInterfaceProperties networkInterface() { + return this.networkInterface; + } + + /** + * Set the networkInterface property: The network interface properties. + * + * @param networkInterface the networkInterface value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withNetworkInterface( + NetworkInterfaceProperties networkInterface) { + this.networkInterface = networkInterface; + return this; + } + + /** + * Get the expirationDate property: The expiration date for VM. + * + * @return the expirationDate value. + */ + public OffsetDateTime expirationDate() { + return this.expirationDate; + } + + /** + * Set the expirationDate property: The expiration date for VM. + * + * @param expirationDate the expirationDate value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withExpirationDate(OffsetDateTime expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * Get the allowClaim property: Indicates whether another user can take ownership of the virtual machine. + * + * @return the allowClaim value. + */ + public Boolean allowClaim() { + return this.allowClaim; + } + + /** + * Set the allowClaim property: Indicates whether another user can take ownership of the virtual machine. + * + * @param allowClaim the allowClaim value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withAllowClaim(Boolean allowClaim) { + this.allowClaim = allowClaim; + return this; + } + + /** + * Get the storageType property: Storage type to use for virtual machine (i.e. Standard, Premium). + * + * @return the storageType value. + */ + public String storageType() { + return this.storageType; + } + + /** + * Set the storageType property: Storage type to use for virtual machine (i.e. Standard, Premium). + * + * @param storageType the storageType value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withStorageType(String storageType) { + this.storageType = storageType; + return this; + } + + /** + * Get the environmentId property: The resource ID of the environment that contains this virtual machine, if any. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: The resource ID of the environment that contains this virtual machine, if any. + * + * @param environmentId the environmentId value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the dataDiskParameters property: New or existing data disks to attach to the virtual machine after creation. + * + * @return the dataDiskParameters value. + */ + public List dataDiskParameters() { + return this.dataDiskParameters; + } + + /** + * Set the dataDiskParameters property: New or existing data disks to attach to the virtual machine after creation. + * + * @param dataDiskParameters the dataDiskParameters value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withDataDiskParameters( + List dataDiskParameters) { + this.dataDiskParameters = dataDiskParameters; + return this; + } + + /** + * Get the scheduleParameters property: Virtual Machine schedules to be created. + * + * @return the scheduleParameters value. + */ + public List scheduleParameters() { + return this.scheduleParameters; + } + + /** + * Set the scheduleParameters property: Virtual Machine schedules to be created. + * + * @param scheduleParameters the scheduleParameters value to set. + * @return the LabVirtualMachineCreationParameterProperties object itself. + */ + public LabVirtualMachineCreationParameterProperties withScheduleParameters( + List scheduleParameters) { + this.scheduleParameters = scheduleParameters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (bulkCreationParameters() != null) { + bulkCreationParameters().validate(); + } + if (artifacts() != null) { + artifacts().forEach(e -> e.validate()); + } + if (galleryImageReference() != null) { + galleryImageReference().validate(); + } + if (networkInterface() != null) { + networkInterface().validate(); + } + if (dataDiskParameters() != null) { + dataDiskParameters().forEach(e -> e.validate()); + } + if (scheduleParameters() != null) { + scheduleParameters().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVirtualMachineInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVirtualMachineInner.java index 5bad56a004e4..1b90d3e1b649 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVirtualMachineInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVirtualMachineInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.ArtifactDeploymentStatusProperties; @@ -16,231 +15,42 @@ import com.azure.resourcemanager.devtestlabs.models.NetworkInterfaceProperties; import com.azure.resourcemanager.devtestlabs.models.ScheduleCreationParameter; import com.azure.resourcemanager.devtestlabs.models.VirtualMachineCreationSource; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** A virtual machine. */ -@JsonFlatten @Fluent -public class LabVirtualMachineInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabVirtualMachineInner.class); - - /* - * The notes of the virtual machine. - */ - @JsonProperty(value = "properties.notes") - private String notes; - - /* - * The object identifier of the owner of the virtual machine. - */ - @JsonProperty(value = "properties.ownerObjectId") - private String ownerObjectId; - - /* - * The user principal name of the virtual machine owner. - */ - @JsonProperty(value = "properties.ownerUserPrincipalName") - private String ownerUserPrincipalName; - - /* - * The object identifier of the creator of the virtual machine. - */ - @JsonProperty(value = "properties.createdByUserId", access = JsonProperty.Access.WRITE_ONLY) - private String createdByUserId; - - /* - * The email address of creator of the virtual machine. - */ - @JsonProperty(value = "properties.createdByUser", access = JsonProperty.Access.WRITE_ONLY) - private String createdByUser; - - /* - * The creation date of the virtual machine. - */ - @JsonProperty(value = "properties.createdDate") - private OffsetDateTime createdDate; - - /* - * The resource identifier (Microsoft.Compute) of the virtual machine. - */ - @JsonProperty(value = "properties.computeId", access = JsonProperty.Access.WRITE_ONLY) - private String computeId; - - /* - * The custom image identifier of the virtual machine. - */ - @JsonProperty(value = "properties.customImageId") - private String customImageId; - - /* - * The OS type of the virtual machine. - */ - @JsonProperty(value = "properties.osType", access = JsonProperty.Access.WRITE_ONLY) - private String osType; - - /* - * The size of the virtual machine. - */ - @JsonProperty(value = "properties.size") - private String size; - - /* - * The user name of the virtual machine. - */ - @JsonProperty(value = "properties.userName") - private String username; - - /* - * The password of the virtual machine administrator. - */ - @JsonProperty(value = "properties.password") - private String password; - - /* - * The SSH key of the virtual machine administrator. - */ - @JsonProperty(value = "properties.sshKey") - private String sshKey; - - /* - * Indicates whether this virtual machine uses an SSH key for - * authentication. - */ - @JsonProperty(value = "properties.isAuthenticationWithSshKey") - private Boolean isAuthenticationWithSshKey; - - /* - * The fully-qualified domain name of the virtual machine. - */ - @JsonProperty(value = "properties.fqdn", access = JsonProperty.Access.WRITE_ONLY) - private String fqdn; - - /* - * The lab subnet name of the virtual machine. - */ - @JsonProperty(value = "properties.labSubnetName") - private String labSubnetName; - - /* - * The lab virtual network identifier of the virtual machine. - */ - @JsonProperty(value = "properties.labVirtualNetworkId") - private String labVirtualNetworkId; - - /* - * Indicates whether the virtual machine is to be created without a public - * IP address. - */ - @JsonProperty(value = "properties.disallowPublicIpAddress") - private Boolean disallowPublicIpAddress; - - /* - * The artifacts to be installed on the virtual machine. - */ - @JsonProperty(value = "properties.artifacts") - private List artifacts; - - /* - * The artifact deployment status for the virtual machine. - */ - @JsonProperty(value = "properties.artifactDeploymentStatus", access = JsonProperty.Access.WRITE_ONLY) - private ArtifactDeploymentStatusProperties artifactDeploymentStatus; - - /* - * The Microsoft Azure Marketplace image reference of the virtual machine. - */ - @JsonProperty(value = "properties.galleryImageReference") - private GalleryImageReference galleryImageReference; - - /* - * The id of the plan associated with the virtual machine image - */ - @JsonProperty(value = "properties.planId") - private String planId; - - /* - * The compute virtual machine properties. - */ - @JsonProperty(value = "properties.computeVm", access = JsonProperty.Access.WRITE_ONLY) - private ComputeVmProperties computeVm; - - /* - * The network interface properties. - */ - @JsonProperty(value = "properties.networkInterface") - private NetworkInterfaceProperties networkInterface; - - /* - * The applicable schedule for the virtual machine. - */ - @JsonProperty(value = "properties.applicableSchedule", access = JsonProperty.Access.WRITE_ONLY) - private ApplicableScheduleInner applicableSchedule; - - /* - * The expiration date for VM. - */ - @JsonProperty(value = "properties.expirationDate") - private OffsetDateTime expirationDate; - +public final class LabVirtualMachineInner extends Resource { /* - * Indicates whether another user can take ownership of the virtual machine + * The properties of the resource. */ - @JsonProperty(value = "properties.allowClaim") - private Boolean allowClaim; + @JsonProperty(value = "properties", required = true) + private LabVirtualMachinePropertiesInner innerProperties = new LabVirtualMachinePropertiesInner(); - /* - * Storage type to use for virtual machine (i.e. Standard, Premium). - */ - @JsonProperty(value = "properties.storageType") - private String storageType; - - /* - * Tells source of creation of lab virtual machine. Output property only. - */ - @JsonProperty(value = "properties.virtualMachineCreationSource", access = JsonProperty.Access.WRITE_ONLY) - private VirtualMachineCreationSource virtualMachineCreationSource; - - /* - * The resource ID of the environment that contains this virtual machine, - * if any. - */ - @JsonProperty(value = "properties.environmentId") - private String environmentId; - - /* - * New or existing data disks to attach to the virtual machine after - * creation - */ - @JsonProperty(value = "properties.dataDiskParameters") - private List dataDiskParameters; - - /* - * Virtual Machine schedules to be created - */ - @JsonProperty(value = "properties.scheduleParameters") - private List scheduleParameters; - - /* - * Last known compute power state captured in DTL + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.lastKnownPowerState", access = JsonProperty.Access.WRITE_ONLY) - private String lastKnownPowerState; + private LabVirtualMachinePropertiesInner innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public LabVirtualMachineInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public LabVirtualMachineInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the notes property: The notes of the virtual machine. @@ -248,7 +58,7 @@ public class LabVirtualMachineInner extends Resource { * @return the notes value. */ public String notes() { - return this.notes; + return this.innerProperties() == null ? null : this.innerProperties().notes(); } /** @@ -258,7 +68,10 @@ public String notes() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withNotes(String notes) { - this.notes = notes; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withNotes(notes); return this; } @@ -268,7 +81,7 @@ public LabVirtualMachineInner withNotes(String notes) { * @return the ownerObjectId value. */ public String ownerObjectId() { - return this.ownerObjectId; + return this.innerProperties() == null ? null : this.innerProperties().ownerObjectId(); } /** @@ -278,7 +91,10 @@ public String ownerObjectId() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withOwnerObjectId(String ownerObjectId) { - this.ownerObjectId = ownerObjectId; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withOwnerObjectId(ownerObjectId); return this; } @@ -288,7 +104,7 @@ public LabVirtualMachineInner withOwnerObjectId(String ownerObjectId) { * @return the ownerUserPrincipalName value. */ public String ownerUserPrincipalName() { - return this.ownerUserPrincipalName; + return this.innerProperties() == null ? null : this.innerProperties().ownerUserPrincipalName(); } /** @@ -298,7 +114,10 @@ public String ownerUserPrincipalName() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withOwnerUserPrincipalName(String ownerUserPrincipalName) { - this.ownerUserPrincipalName = ownerUserPrincipalName; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withOwnerUserPrincipalName(ownerUserPrincipalName); return this; } @@ -308,7 +127,7 @@ public LabVirtualMachineInner withOwnerUserPrincipalName(String ownerUserPrincip * @return the createdByUserId value. */ public String createdByUserId() { - return this.createdByUserId; + return this.innerProperties() == null ? null : this.innerProperties().createdByUserId(); } /** @@ -317,7 +136,7 @@ public String createdByUserId() { * @return the createdByUser value. */ public String createdByUser() { - return this.createdByUser; + return this.innerProperties() == null ? null : this.innerProperties().createdByUser(); } /** @@ -326,7 +145,7 @@ public String createdByUser() { * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -336,7 +155,10 @@ public OffsetDateTime createdDate() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withCreatedDate(OffsetDateTime createdDate) { - this.createdDate = createdDate; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withCreatedDate(createdDate); return this; } @@ -346,7 +168,7 @@ public LabVirtualMachineInner withCreatedDate(OffsetDateTime createdDate) { * @return the computeId value. */ public String computeId() { - return this.computeId; + return this.innerProperties() == null ? null : this.innerProperties().computeId(); } /** @@ -355,7 +177,7 @@ public String computeId() { * @return the customImageId value. */ public String customImageId() { - return this.customImageId; + return this.innerProperties() == null ? null : this.innerProperties().customImageId(); } /** @@ -365,7 +187,10 @@ public String customImageId() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withCustomImageId(String customImageId) { - this.customImageId = customImageId; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withCustomImageId(customImageId); return this; } @@ -375,7 +200,7 @@ public LabVirtualMachineInner withCustomImageId(String customImageId) { * @return the osType value. */ public String osType() { - return this.osType; + return this.innerProperties() == null ? null : this.innerProperties().osType(); } /** @@ -384,7 +209,7 @@ public String osType() { * @return the size value. */ public String size() { - return this.size; + return this.innerProperties() == null ? null : this.innerProperties().size(); } /** @@ -394,7 +219,10 @@ public String size() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withSize(String size) { - this.size = size; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withSize(size); return this; } @@ -404,7 +232,7 @@ public LabVirtualMachineInner withSize(String size) { * @return the username value. */ public String username() { - return this.username; + return this.innerProperties() == null ? null : this.innerProperties().username(); } /** @@ -414,7 +242,10 @@ public String username() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withUsername(String username) { - this.username = username; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withUsername(username); return this; } @@ -424,7 +255,7 @@ public LabVirtualMachineInner withUsername(String username) { * @return the password value. */ public String password() { - return this.password; + return this.innerProperties() == null ? null : this.innerProperties().password(); } /** @@ -434,7 +265,10 @@ public String password() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withPassword(String password) { - this.password = password; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withPassword(password); return this; } @@ -444,7 +278,7 @@ public LabVirtualMachineInner withPassword(String password) { * @return the sshKey value. */ public String sshKey() { - return this.sshKey; + return this.innerProperties() == null ? null : this.innerProperties().sshKey(); } /** @@ -454,7 +288,10 @@ public String sshKey() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withSshKey(String sshKey) { - this.sshKey = sshKey; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withSshKey(sshKey); return this; } @@ -465,7 +302,7 @@ public LabVirtualMachineInner withSshKey(String sshKey) { * @return the isAuthenticationWithSshKey value. */ public Boolean isAuthenticationWithSshKey() { - return this.isAuthenticationWithSshKey; + return this.innerProperties() == null ? null : this.innerProperties().isAuthenticationWithSshKey(); } /** @@ -476,7 +313,10 @@ public Boolean isAuthenticationWithSshKey() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withIsAuthenticationWithSshKey(Boolean isAuthenticationWithSshKey) { - this.isAuthenticationWithSshKey = isAuthenticationWithSshKey; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withIsAuthenticationWithSshKey(isAuthenticationWithSshKey); return this; } @@ -486,7 +326,7 @@ public LabVirtualMachineInner withIsAuthenticationWithSshKey(Boolean isAuthentic * @return the fqdn value. */ public String fqdn() { - return this.fqdn; + return this.innerProperties() == null ? null : this.innerProperties().fqdn(); } /** @@ -495,7 +335,7 @@ public String fqdn() { * @return the labSubnetName value. */ public String labSubnetName() { - return this.labSubnetName; + return this.innerProperties() == null ? null : this.innerProperties().labSubnetName(); } /** @@ -505,7 +345,10 @@ public String labSubnetName() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withLabSubnetName(String labSubnetName) { - this.labSubnetName = labSubnetName; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withLabSubnetName(labSubnetName); return this; } @@ -515,7 +358,7 @@ public LabVirtualMachineInner withLabSubnetName(String labSubnetName) { * @return the labVirtualNetworkId value. */ public String labVirtualNetworkId() { - return this.labVirtualNetworkId; + return this.innerProperties() == null ? null : this.innerProperties().labVirtualNetworkId(); } /** @@ -525,7 +368,10 @@ public String labVirtualNetworkId() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withLabVirtualNetworkId(String labVirtualNetworkId) { - this.labVirtualNetworkId = labVirtualNetworkId; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withLabVirtualNetworkId(labVirtualNetworkId); return this; } @@ -536,7 +382,7 @@ public LabVirtualMachineInner withLabVirtualNetworkId(String labVirtualNetworkId * @return the disallowPublicIpAddress value. */ public Boolean disallowPublicIpAddress() { - return this.disallowPublicIpAddress; + return this.innerProperties() == null ? null : this.innerProperties().disallowPublicIpAddress(); } /** @@ -547,7 +393,10 @@ public Boolean disallowPublicIpAddress() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withDisallowPublicIpAddress(Boolean disallowPublicIpAddress) { - this.disallowPublicIpAddress = disallowPublicIpAddress; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withDisallowPublicIpAddress(disallowPublicIpAddress); return this; } @@ -557,7 +406,7 @@ public LabVirtualMachineInner withDisallowPublicIpAddress(Boolean disallowPublic * @return the artifacts value. */ public List artifacts() { - return this.artifacts; + return this.innerProperties() == null ? null : this.innerProperties().artifacts(); } /** @@ -567,7 +416,10 @@ public List artifacts() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withArtifacts(List artifacts) { - this.artifacts = artifacts; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withArtifacts(artifacts); return this; } @@ -577,7 +429,7 @@ public LabVirtualMachineInner withArtifacts(List arti * @return the artifactDeploymentStatus value. */ public ArtifactDeploymentStatusProperties artifactDeploymentStatus() { - return this.artifactDeploymentStatus; + return this.innerProperties() == null ? null : this.innerProperties().artifactDeploymentStatus(); } /** @@ -586,7 +438,7 @@ public ArtifactDeploymentStatusProperties artifactDeploymentStatus() { * @return the galleryImageReference value. */ public GalleryImageReference galleryImageReference() { - return this.galleryImageReference; + return this.innerProperties() == null ? null : this.innerProperties().galleryImageReference(); } /** @@ -596,7 +448,10 @@ public GalleryImageReference galleryImageReference() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withGalleryImageReference(GalleryImageReference galleryImageReference) { - this.galleryImageReference = galleryImageReference; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withGalleryImageReference(galleryImageReference); return this; } @@ -606,7 +461,7 @@ public LabVirtualMachineInner withGalleryImageReference(GalleryImageReference ga * @return the planId value. */ public String planId() { - return this.planId; + return this.innerProperties() == null ? null : this.innerProperties().planId(); } /** @@ -616,7 +471,10 @@ public String planId() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withPlanId(String planId) { - this.planId = planId; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withPlanId(planId); return this; } @@ -626,7 +484,7 @@ public LabVirtualMachineInner withPlanId(String planId) { * @return the computeVm value. */ public ComputeVmProperties computeVm() { - return this.computeVm; + return this.innerProperties() == null ? null : this.innerProperties().computeVm(); } /** @@ -635,7 +493,7 @@ public ComputeVmProperties computeVm() { * @return the networkInterface value. */ public NetworkInterfaceProperties networkInterface() { - return this.networkInterface; + return this.innerProperties() == null ? null : this.innerProperties().networkInterface(); } /** @@ -645,7 +503,10 @@ public NetworkInterfaceProperties networkInterface() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withNetworkInterface(NetworkInterfaceProperties networkInterface) { - this.networkInterface = networkInterface; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withNetworkInterface(networkInterface); return this; } @@ -655,7 +516,7 @@ public LabVirtualMachineInner withNetworkInterface(NetworkInterfaceProperties ne * @return the applicableSchedule value. */ public ApplicableScheduleInner applicableSchedule() { - return this.applicableSchedule; + return this.innerProperties() == null ? null : this.innerProperties().applicableSchedule(); } /** @@ -664,7 +525,7 @@ public ApplicableScheduleInner applicableSchedule() { * @return the expirationDate value. */ public OffsetDateTime expirationDate() { - return this.expirationDate; + return this.innerProperties() == null ? null : this.innerProperties().expirationDate(); } /** @@ -674,7 +535,10 @@ public OffsetDateTime expirationDate() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withExpirationDate(OffsetDateTime expirationDate) { - this.expirationDate = expirationDate; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withExpirationDate(expirationDate); return this; } @@ -684,7 +548,7 @@ public LabVirtualMachineInner withExpirationDate(OffsetDateTime expirationDate) * @return the allowClaim value. */ public Boolean allowClaim() { - return this.allowClaim; + return this.innerProperties() == null ? null : this.innerProperties().allowClaim(); } /** @@ -694,7 +558,10 @@ public Boolean allowClaim() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withAllowClaim(Boolean allowClaim) { - this.allowClaim = allowClaim; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withAllowClaim(allowClaim); return this; } @@ -704,7 +571,7 @@ public LabVirtualMachineInner withAllowClaim(Boolean allowClaim) { * @return the storageType value. */ public String storageType() { - return this.storageType; + return this.innerProperties() == null ? null : this.innerProperties().storageType(); } /** @@ -714,7 +581,10 @@ public String storageType() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withStorageType(String storageType) { - this.storageType = storageType; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withStorageType(storageType); return this; } @@ -725,7 +595,7 @@ public LabVirtualMachineInner withStorageType(String storageType) { * @return the virtualMachineCreationSource value. */ public VirtualMachineCreationSource virtualMachineCreationSource() { - return this.virtualMachineCreationSource; + return this.innerProperties() == null ? null : this.innerProperties().virtualMachineCreationSource(); } /** @@ -734,7 +604,7 @@ public VirtualMachineCreationSource virtualMachineCreationSource() { * @return the environmentId value. */ public String environmentId() { - return this.environmentId; + return this.innerProperties() == null ? null : this.innerProperties().environmentId(); } /** @@ -744,7 +614,10 @@ public String environmentId() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withEnvironmentId(String environmentId) { - this.environmentId = environmentId; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withEnvironmentId(environmentId); return this; } @@ -754,7 +627,7 @@ public LabVirtualMachineInner withEnvironmentId(String environmentId) { * @return the dataDiskParameters value. */ public List dataDiskParameters() { - return this.dataDiskParameters; + return this.innerProperties() == null ? null : this.innerProperties().dataDiskParameters(); } /** @@ -764,7 +637,10 @@ public List dataDiskParameters() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withDataDiskParameters(List dataDiskParameters) { - this.dataDiskParameters = dataDiskParameters; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withDataDiskParameters(dataDiskParameters); return this; } @@ -774,7 +650,7 @@ public LabVirtualMachineInner withDataDiskParameters(List da * @return the scheduleParameters value. */ public List scheduleParameters() { - return this.scheduleParameters; + return this.innerProperties() == null ? null : this.innerProperties().scheduleParameters(); } /** @@ -784,7 +660,10 @@ public List scheduleParameters() { * @return the LabVirtualMachineInner object itself. */ public LabVirtualMachineInner withScheduleParameters(List scheduleParameters) { - this.scheduleParameters = scheduleParameters; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachinePropertiesInner(); + } + this.innerProperties().withScheduleParameters(scheduleParameters); return this; } @@ -794,7 +673,7 @@ public LabVirtualMachineInner withScheduleParameters(List tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -835,29 +700,15 @@ public LabVirtualMachineInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (artifacts() != null) { - artifacts().forEach(e -> e.validate()); - } - if (artifactDeploymentStatus() != null) { - artifactDeploymentStatus().validate(); - } - if (galleryImageReference() != null) { - galleryImageReference().validate(); - } - if (computeVm() != null) { - computeVm().validate(); - } - if (networkInterface() != null) { - networkInterface().validate(); - } - if (applicableSchedule() != null) { - applicableSchedule().validate(); - } - if (dataDiskParameters() != null) { - dataDiskParameters().forEach(e -> e.validate()); - } - if (scheduleParameters() != null) { - scheduleParameters().forEach(e -> e.validate()); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model LabVirtualMachineInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(LabVirtualMachineInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVirtualMachinePropertiesInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVirtualMachinePropertiesInner.java new file mode 100644 index 000000000000..953c3051307b --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/LabVirtualMachinePropertiesInner.java @@ -0,0 +1,841 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.ArtifactDeploymentStatusProperties; +import com.azure.resourcemanager.devtestlabs.models.ArtifactInstallProperties; +import com.azure.resourcemanager.devtestlabs.models.ComputeVmProperties; +import com.azure.resourcemanager.devtestlabs.models.DataDiskProperties; +import com.azure.resourcemanager.devtestlabs.models.GalleryImageReference; +import com.azure.resourcemanager.devtestlabs.models.NetworkInterfaceProperties; +import com.azure.resourcemanager.devtestlabs.models.ScheduleCreationParameter; +import com.azure.resourcemanager.devtestlabs.models.VirtualMachineCreationSource; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Properties of a virtual machine. */ +@Fluent +public final class LabVirtualMachinePropertiesInner { + /* + * The notes of the virtual machine. + */ + @JsonProperty(value = "notes") + private String notes; + + /* + * The object identifier of the owner of the virtual machine. + */ + @JsonProperty(value = "ownerObjectId") + private String ownerObjectId; + + /* + * The user principal name of the virtual machine owner. + */ + @JsonProperty(value = "ownerUserPrincipalName") + private String ownerUserPrincipalName; + + /* + * The object identifier of the creator of the virtual machine. + */ + @JsonProperty(value = "createdByUserId", access = JsonProperty.Access.WRITE_ONLY) + private String createdByUserId; + + /* + * The email address of creator of the virtual machine. + */ + @JsonProperty(value = "createdByUser", access = JsonProperty.Access.WRITE_ONLY) + private String createdByUser; + + /* + * The creation date of the virtual machine. + */ + @JsonProperty(value = "createdDate") + private OffsetDateTime createdDate; + + /* + * The resource identifier (Microsoft.Compute) of the virtual machine. + */ + @JsonProperty(value = "computeId", access = JsonProperty.Access.WRITE_ONLY) + private String computeId; + + /* + * The custom image identifier of the virtual machine. + */ + @JsonProperty(value = "customImageId") + private String customImageId; + + /* + * The OS type of the virtual machine. + */ + @JsonProperty(value = "osType", access = JsonProperty.Access.WRITE_ONLY) + private String osType; + + /* + * The size of the virtual machine. + */ + @JsonProperty(value = "size") + private String size; + + /* + * The user name of the virtual machine. + */ + @JsonProperty(value = "userName") + private String username; + + /* + * The password of the virtual machine administrator. + */ + @JsonProperty(value = "password") + private String password; + + /* + * The SSH key of the virtual machine administrator. + */ + @JsonProperty(value = "sshKey") + private String sshKey; + + /* + * Indicates whether this virtual machine uses an SSH key for + * authentication. + */ + @JsonProperty(value = "isAuthenticationWithSshKey") + private Boolean isAuthenticationWithSshKey; + + /* + * The fully-qualified domain name of the virtual machine. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /* + * The lab subnet name of the virtual machine. + */ + @JsonProperty(value = "labSubnetName") + private String labSubnetName; + + /* + * The lab virtual network identifier of the virtual machine. + */ + @JsonProperty(value = "labVirtualNetworkId") + private String labVirtualNetworkId; + + /* + * Indicates whether the virtual machine is to be created without a public + * IP address. + */ + @JsonProperty(value = "disallowPublicIpAddress") + private Boolean disallowPublicIpAddress; + + /* + * The artifacts to be installed on the virtual machine. + */ + @JsonProperty(value = "artifacts") + private List artifacts; + + /* + * The artifact deployment status for the virtual machine. + */ + @JsonProperty(value = "artifactDeploymentStatus", access = JsonProperty.Access.WRITE_ONLY) + private ArtifactDeploymentStatusProperties artifactDeploymentStatus; + + /* + * The Microsoft Azure Marketplace image reference of the virtual machine. + */ + @JsonProperty(value = "galleryImageReference") + private GalleryImageReference galleryImageReference; + + /* + * The id of the plan associated with the virtual machine image + */ + @JsonProperty(value = "planId") + private String planId; + + /* + * The compute virtual machine properties. + */ + @JsonProperty(value = "computeVm", access = JsonProperty.Access.WRITE_ONLY) + private ComputeVmProperties computeVm; + + /* + * The network interface properties. + */ + @JsonProperty(value = "networkInterface") + private NetworkInterfaceProperties networkInterface; + + /* + * The applicable schedule for the virtual machine. + */ + @JsonProperty(value = "applicableSchedule", access = JsonProperty.Access.WRITE_ONLY) + private ApplicableScheduleInner applicableSchedule; + + /* + * The expiration date for VM. + */ + @JsonProperty(value = "expirationDate") + private OffsetDateTime expirationDate; + + /* + * Indicates whether another user can take ownership of the virtual machine + */ + @JsonProperty(value = "allowClaim") + private Boolean allowClaim; + + /* + * Storage type to use for virtual machine (i.e. Standard, Premium). + */ + @JsonProperty(value = "storageType") + private String storageType; + + /* + * Tells source of creation of lab virtual machine. Output property only. + */ + @JsonProperty(value = "virtualMachineCreationSource", access = JsonProperty.Access.WRITE_ONLY) + private VirtualMachineCreationSource virtualMachineCreationSource; + + /* + * The resource ID of the environment that contains this virtual machine, + * if any. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /* + * New or existing data disks to attach to the virtual machine after + * creation + */ + @JsonProperty(value = "dataDiskParameters") + private List dataDiskParameters; + + /* + * Virtual Machine schedules to be created + */ + @JsonProperty(value = "scheduleParameters") + private List scheduleParameters; + + /* + * Last known compute power state captured in DTL + */ + @JsonProperty(value = "lastKnownPowerState", access = JsonProperty.Access.WRITE_ONLY) + private String lastKnownPowerState; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the notes property: The notes of the virtual machine. + * + * @return the notes value. + */ + public String notes() { + return this.notes; + } + + /** + * Set the notes property: The notes of the virtual machine. + * + * @param notes the notes value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withNotes(String notes) { + this.notes = notes; + return this; + } + + /** + * Get the ownerObjectId property: The object identifier of the owner of the virtual machine. + * + * @return the ownerObjectId value. + */ + public String ownerObjectId() { + return this.ownerObjectId; + } + + /** + * Set the ownerObjectId property: The object identifier of the owner of the virtual machine. + * + * @param ownerObjectId the ownerObjectId value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withOwnerObjectId(String ownerObjectId) { + this.ownerObjectId = ownerObjectId; + return this; + } + + /** + * Get the ownerUserPrincipalName property: The user principal name of the virtual machine owner. + * + * @return the ownerUserPrincipalName value. + */ + public String ownerUserPrincipalName() { + return this.ownerUserPrincipalName; + } + + /** + * Set the ownerUserPrincipalName property: The user principal name of the virtual machine owner. + * + * @param ownerUserPrincipalName the ownerUserPrincipalName value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withOwnerUserPrincipalName(String ownerUserPrincipalName) { + this.ownerUserPrincipalName = ownerUserPrincipalName; + return this; + } + + /** + * Get the createdByUserId property: The object identifier of the creator of the virtual machine. + * + * @return the createdByUserId value. + */ + public String createdByUserId() { + return this.createdByUserId; + } + + /** + * Get the createdByUser property: The email address of creator of the virtual machine. + * + * @return the createdByUser value. + */ + public String createdByUser() { + return this.createdByUser; + } + + /** + * Get the createdDate property: The creation date of the virtual machine. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Set the createdDate property: The creation date of the virtual machine. + * + * @param createdDate the createdDate value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withCreatedDate(OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get the computeId property: The resource identifier (Microsoft.Compute) of the virtual machine. + * + * @return the computeId value. + */ + public String computeId() { + return this.computeId; + } + + /** + * Get the customImageId property: The custom image identifier of the virtual machine. + * + * @return the customImageId value. + */ + public String customImageId() { + return this.customImageId; + } + + /** + * Set the customImageId property: The custom image identifier of the virtual machine. + * + * @param customImageId the customImageId value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withCustomImageId(String customImageId) { + this.customImageId = customImageId; + return this; + } + + /** + * Get the osType property: The OS type of the virtual machine. + * + * @return the osType value. + */ + public String osType() { + return this.osType; + } + + /** + * Get the size property: The size of the virtual machine. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: The size of the virtual machine. + * + * @param size the size value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the username property: The user name of the virtual machine. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: The user name of the virtual machine. + * + * @param username the username value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password property: The password of the virtual machine administrator. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: The password of the virtual machine administrator. + * + * @param password the password value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the sshKey property: The SSH key of the virtual machine administrator. + * + * @return the sshKey value. + */ + public String sshKey() { + return this.sshKey; + } + + /** + * Set the sshKey property: The SSH key of the virtual machine administrator. + * + * @param sshKey the sshKey value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withSshKey(String sshKey) { + this.sshKey = sshKey; + return this; + } + + /** + * Get the isAuthenticationWithSshKey property: Indicates whether this virtual machine uses an SSH key for + * authentication. + * + * @return the isAuthenticationWithSshKey value. + */ + public Boolean isAuthenticationWithSshKey() { + return this.isAuthenticationWithSshKey; + } + + /** + * Set the isAuthenticationWithSshKey property: Indicates whether this virtual machine uses an SSH key for + * authentication. + * + * @param isAuthenticationWithSshKey the isAuthenticationWithSshKey value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withIsAuthenticationWithSshKey(Boolean isAuthenticationWithSshKey) { + this.isAuthenticationWithSshKey = isAuthenticationWithSshKey; + return this; + } + + /** + * Get the fqdn property: The fully-qualified domain name of the virtual machine. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get the labSubnetName property: The lab subnet name of the virtual machine. + * + * @return the labSubnetName value. + */ + public String labSubnetName() { + return this.labSubnetName; + } + + /** + * Set the labSubnetName property: The lab subnet name of the virtual machine. + * + * @param labSubnetName the labSubnetName value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withLabSubnetName(String labSubnetName) { + this.labSubnetName = labSubnetName; + return this; + } + + /** + * Get the labVirtualNetworkId property: The lab virtual network identifier of the virtual machine. + * + * @return the labVirtualNetworkId value. + */ + public String labVirtualNetworkId() { + return this.labVirtualNetworkId; + } + + /** + * Set the labVirtualNetworkId property: The lab virtual network identifier of the virtual machine. + * + * @param labVirtualNetworkId the labVirtualNetworkId value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withLabVirtualNetworkId(String labVirtualNetworkId) { + this.labVirtualNetworkId = labVirtualNetworkId; + return this; + } + + /** + * Get the disallowPublicIpAddress property: Indicates whether the virtual machine is to be created without a public + * IP address. + * + * @return the disallowPublicIpAddress value. + */ + public Boolean disallowPublicIpAddress() { + return this.disallowPublicIpAddress; + } + + /** + * Set the disallowPublicIpAddress property: Indicates whether the virtual machine is to be created without a public + * IP address. + * + * @param disallowPublicIpAddress the disallowPublicIpAddress value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withDisallowPublicIpAddress(Boolean disallowPublicIpAddress) { + this.disallowPublicIpAddress = disallowPublicIpAddress; + return this; + } + + /** + * Get the artifacts property: The artifacts to be installed on the virtual machine. + * + * @return the artifacts value. + */ + public List artifacts() { + return this.artifacts; + } + + /** + * Set the artifacts property: The artifacts to be installed on the virtual machine. + * + * @param artifacts the artifacts value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withArtifacts(List artifacts) { + this.artifacts = artifacts; + return this; + } + + /** + * Get the artifactDeploymentStatus property: The artifact deployment status for the virtual machine. + * + * @return the artifactDeploymentStatus value. + */ + public ArtifactDeploymentStatusProperties artifactDeploymentStatus() { + return this.artifactDeploymentStatus; + } + + /** + * Get the galleryImageReference property: The Microsoft Azure Marketplace image reference of the virtual machine. + * + * @return the galleryImageReference value. + */ + public GalleryImageReference galleryImageReference() { + return this.galleryImageReference; + } + + /** + * Set the galleryImageReference property: The Microsoft Azure Marketplace image reference of the virtual machine. + * + * @param galleryImageReference the galleryImageReference value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withGalleryImageReference(GalleryImageReference galleryImageReference) { + this.galleryImageReference = galleryImageReference; + return this; + } + + /** + * Get the planId property: The id of the plan associated with the virtual machine image. + * + * @return the planId value. + */ + public String planId() { + return this.planId; + } + + /** + * Set the planId property: The id of the plan associated with the virtual machine image. + * + * @param planId the planId value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withPlanId(String planId) { + this.planId = planId; + return this; + } + + /** + * Get the computeVm property: The compute virtual machine properties. + * + * @return the computeVm value. + */ + public ComputeVmProperties computeVm() { + return this.computeVm; + } + + /** + * Get the networkInterface property: The network interface properties. + * + * @return the networkInterface value. + */ + public NetworkInterfaceProperties networkInterface() { + return this.networkInterface; + } + + /** + * Set the networkInterface property: The network interface properties. + * + * @param networkInterface the networkInterface value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withNetworkInterface(NetworkInterfaceProperties networkInterface) { + this.networkInterface = networkInterface; + return this; + } + + /** + * Get the applicableSchedule property: The applicable schedule for the virtual machine. + * + * @return the applicableSchedule value. + */ + public ApplicableScheduleInner applicableSchedule() { + return this.applicableSchedule; + } + + /** + * Get the expirationDate property: The expiration date for VM. + * + * @return the expirationDate value. + */ + public OffsetDateTime expirationDate() { + return this.expirationDate; + } + + /** + * Set the expirationDate property: The expiration date for VM. + * + * @param expirationDate the expirationDate value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withExpirationDate(OffsetDateTime expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * Get the allowClaim property: Indicates whether another user can take ownership of the virtual machine. + * + * @return the allowClaim value. + */ + public Boolean allowClaim() { + return this.allowClaim; + } + + /** + * Set the allowClaim property: Indicates whether another user can take ownership of the virtual machine. + * + * @param allowClaim the allowClaim value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withAllowClaim(Boolean allowClaim) { + this.allowClaim = allowClaim; + return this; + } + + /** + * Get the storageType property: Storage type to use for virtual machine (i.e. Standard, Premium). + * + * @return the storageType value. + */ + public String storageType() { + return this.storageType; + } + + /** + * Set the storageType property: Storage type to use for virtual machine (i.e. Standard, Premium). + * + * @param storageType the storageType value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withStorageType(String storageType) { + this.storageType = storageType; + return this; + } + + /** + * Get the virtualMachineCreationSource property: Tells source of creation of lab virtual machine. Output property + * only. + * + * @return the virtualMachineCreationSource value. + */ + public VirtualMachineCreationSource virtualMachineCreationSource() { + return this.virtualMachineCreationSource; + } + + /** + * Get the environmentId property: The resource ID of the environment that contains this virtual machine, if any. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: The resource ID of the environment that contains this virtual machine, if any. + * + * @param environmentId the environmentId value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the dataDiskParameters property: New or existing data disks to attach to the virtual machine after creation. + * + * @return the dataDiskParameters value. + */ + public List dataDiskParameters() { + return this.dataDiskParameters; + } + + /** + * Set the dataDiskParameters property: New or existing data disks to attach to the virtual machine after creation. + * + * @param dataDiskParameters the dataDiskParameters value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withDataDiskParameters(List dataDiskParameters) { + this.dataDiskParameters = dataDiskParameters; + return this; + } + + /** + * Get the scheduleParameters property: Virtual Machine schedules to be created. + * + * @return the scheduleParameters value. + */ + public List scheduleParameters() { + return this.scheduleParameters; + } + + /** + * Set the scheduleParameters property: Virtual Machine schedules to be created. + * + * @param scheduleParameters the scheduleParameters value to set. + * @return the LabVirtualMachinePropertiesInner object itself. + */ + public LabVirtualMachinePropertiesInner withScheduleParameters(List scheduleParameters) { + this.scheduleParameters = scheduleParameters; + return this; + } + + /** + * Get the lastKnownPowerState property: Last known compute power state captured in DTL. + * + * @return the lastKnownPowerState value. + */ + public String lastKnownPowerState() { + return this.lastKnownPowerState; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (artifacts() != null) { + artifacts().forEach(e -> e.validate()); + } + if (artifactDeploymentStatus() != null) { + artifactDeploymentStatus().validate(); + } + if (galleryImageReference() != null) { + galleryImageReference().validate(); + } + if (computeVm() != null) { + computeVm().validate(); + } + if (networkInterface() != null) { + networkInterface().validate(); + } + if (applicableSchedule() != null) { + applicableSchedule().validate(); + } + if (dataDiskParameters() != null) { + dataDiskParameters().forEach(e -> e.validate()); + } + if (scheduleParameters() != null) { + scheduleParameters().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/NotificationChannelInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/NotificationChannelInner.java index a58c1b1518d5..f44b3e3e6188 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/NotificationChannelInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/NotificationChannelInner.java @@ -5,71 +5,45 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.Event; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** A notification. */ -@JsonFlatten @Fluent -public class NotificationChannelInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NotificationChannelInner.class); - - /* - * The webhook URL to send notifications to. - */ - @JsonProperty(value = "properties.webHookUrl") - private String webhookUrl; - - /* - * The email recipient to send notifications to (can be a list of - * semi-colon separated email addresses). - */ - @JsonProperty(value = "properties.emailRecipient") - private String emailRecipient; - - /* - * The locale to use when sending a notification (fallback for unsupported - * languages is EN). - */ - @JsonProperty(value = "properties.notificationLocale") - private String notificationLocale; - - /* - * Description of notification. - */ - @JsonProperty(value = "properties.description") - private String description; - +public final class NotificationChannelInner extends Resource { /* - * The list of event for which this notification is enabled. + * The properties of the resource. */ - @JsonProperty(value = "properties.events") - private List events; + @JsonProperty(value = "properties", required = true) + private NotificationChannelProperties innerProperties = new NotificationChannelProperties(); - /* - * The creation date of the notification channel. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDate; + private NotificationChannelProperties innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public NotificationChannelInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public NotificationChannelInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the webhookUrl property: The webhook URL to send notifications to. @@ -77,7 +51,7 @@ public class NotificationChannelInner extends Resource { * @return the webhookUrl value. */ public String webhookUrl() { - return this.webhookUrl; + return this.innerProperties() == null ? null : this.innerProperties().webhookUrl(); } /** @@ -87,7 +61,10 @@ public String webhookUrl() { * @return the NotificationChannelInner object itself. */ public NotificationChannelInner withWebhookUrl(String webhookUrl) { - this.webhookUrl = webhookUrl; + if (this.innerProperties() == null) { + this.innerProperties = new NotificationChannelProperties(); + } + this.innerProperties().withWebhookUrl(webhookUrl); return this; } @@ -98,7 +75,7 @@ public NotificationChannelInner withWebhookUrl(String webhookUrl) { * @return the emailRecipient value. */ public String emailRecipient() { - return this.emailRecipient; + return this.innerProperties() == null ? null : this.innerProperties().emailRecipient(); } /** @@ -109,7 +86,10 @@ public String emailRecipient() { * @return the NotificationChannelInner object itself. */ public NotificationChannelInner withEmailRecipient(String emailRecipient) { - this.emailRecipient = emailRecipient; + if (this.innerProperties() == null) { + this.innerProperties = new NotificationChannelProperties(); + } + this.innerProperties().withEmailRecipient(emailRecipient); return this; } @@ -120,7 +100,7 @@ public NotificationChannelInner withEmailRecipient(String emailRecipient) { * @return the notificationLocale value. */ public String notificationLocale() { - return this.notificationLocale; + return this.innerProperties() == null ? null : this.innerProperties().notificationLocale(); } /** @@ -131,7 +111,10 @@ public String notificationLocale() { * @return the NotificationChannelInner object itself. */ public NotificationChannelInner withNotificationLocale(String notificationLocale) { - this.notificationLocale = notificationLocale; + if (this.innerProperties() == null) { + this.innerProperties = new NotificationChannelProperties(); + } + this.innerProperties().withNotificationLocale(notificationLocale); return this; } @@ -141,7 +124,7 @@ public NotificationChannelInner withNotificationLocale(String notificationLocale * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -151,7 +134,10 @@ public String description() { * @return the NotificationChannelInner object itself. */ public NotificationChannelInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new NotificationChannelProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -161,7 +147,7 @@ public NotificationChannelInner withDescription(String description) { * @return the events value. */ public List events() { - return this.events; + return this.innerProperties() == null ? null : this.innerProperties().events(); } /** @@ -171,7 +157,10 @@ public List events() { * @return the NotificationChannelInner object itself. */ public NotificationChannelInner withEvents(List events) { - this.events = events; + if (this.innerProperties() == null) { + this.innerProperties = new NotificationChannelProperties(); + } + this.innerProperties().withEvents(events); return this; } @@ -181,7 +170,7 @@ public NotificationChannelInner withEvents(List events) { * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -190,7 +179,7 @@ public OffsetDateTime createdDate() { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -199,21 +188,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public NotificationChannelInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public NotificationChannelInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -222,8 +197,15 @@ public NotificationChannelInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (events() != null) { - events().forEach(e -> e.validate()); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model NotificationChannelInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(NotificationChannelInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/NotificationChannelProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/NotificationChannelProperties.java new file mode 100644 index 000000000000..2a90c15c0bc2 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/NotificationChannelProperties.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.Event; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Properties of a schedule. */ +@Fluent +public final class NotificationChannelProperties { + /* + * The webhook URL to send notifications to. + */ + @JsonProperty(value = "webHookUrl") + private String webhookUrl; + + /* + * The email recipient to send notifications to (can be a list of + * semi-colon separated email addresses). + */ + @JsonProperty(value = "emailRecipient") + private String emailRecipient; + + /* + * The locale to use when sending a notification (fallback for unsupported + * languages is EN). + */ + @JsonProperty(value = "notificationLocale") + private String notificationLocale; + + /* + * Description of notification. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The list of event for which this notification is enabled. + */ + @JsonProperty(value = "events") + private List events; + + /* + * The creation date of the notification channel. + */ + @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDate; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the webhookUrl property: The webhook URL to send notifications to. + * + * @return the webhookUrl value. + */ + public String webhookUrl() { + return this.webhookUrl; + } + + /** + * Set the webhookUrl property: The webhook URL to send notifications to. + * + * @param webhookUrl the webhookUrl value to set. + * @return the NotificationChannelProperties object itself. + */ + public NotificationChannelProperties withWebhookUrl(String webhookUrl) { + this.webhookUrl = webhookUrl; + return this; + } + + /** + * Get the emailRecipient property: The email recipient to send notifications to (can be a list of semi-colon + * separated email addresses). + * + * @return the emailRecipient value. + */ + public String emailRecipient() { + return this.emailRecipient; + } + + /** + * Set the emailRecipient property: The email recipient to send notifications to (can be a list of semi-colon + * separated email addresses). + * + * @param emailRecipient the emailRecipient value to set. + * @return the NotificationChannelProperties object itself. + */ + public NotificationChannelProperties withEmailRecipient(String emailRecipient) { + this.emailRecipient = emailRecipient; + return this; + } + + /** + * Get the notificationLocale property: The locale to use when sending a notification (fallback for unsupported + * languages is EN). + * + * @return the notificationLocale value. + */ + public String notificationLocale() { + return this.notificationLocale; + } + + /** + * Set the notificationLocale property: The locale to use when sending a notification (fallback for unsupported + * languages is EN). + * + * @param notificationLocale the notificationLocale value to set. + * @return the NotificationChannelProperties object itself. + */ + public NotificationChannelProperties withNotificationLocale(String notificationLocale) { + this.notificationLocale = notificationLocale; + return this; + } + + /** + * Get the description property: Description of notification. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of notification. + * + * @param description the description value to set. + * @return the NotificationChannelProperties object itself. + */ + public NotificationChannelProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the events property: The list of event for which this notification is enabled. + * + * @return the events value. + */ + public List events() { + return this.events; + } + + /** + * Set the events property: The list of event for which this notification is enabled. + * + * @param events the events value to set. + * @return the NotificationChannelProperties object itself. + */ + public NotificationChannelProperties withEvents(List events) { + this.events = events; + return this; + } + + /** + * Get the createdDate property: The creation date of the notification channel. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (events() != null) { + events().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/OperationMetadataInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/OperationMetadataInner.java index 2f38d31f0b55..60a0dbb77ebb 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/OperationMetadataInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/OperationMetadataInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.OperationMetadataDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The REST API operation supported by DevTestLab ResourceProvider. */ @Fluent public final class OperationMetadataInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationMetadataInner.class); - /* * Operation name: {provider}/{resource}/{operation} */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/OperationResultInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/OperationResultInner.java index ab919833b35c..30b0c5465ec0 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/OperationResultInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/OperationResultInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.HttpStatusCode; import com.azure.resourcemanager.devtestlabs.models.OperationError; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** An Operation Result. */ @Fluent public final class OperationResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultInner.class); - /* * The operation status. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/PolicyInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/PolicyInner.java index c8ede6a5a05e..cc9314a0af87 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/PolicyInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/PolicyInner.java @@ -5,79 +5,46 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.PolicyEvaluatorType; import com.azure.resourcemanager.devtestlabs.models.PolicyFactName; import com.azure.resourcemanager.devtestlabs.models.PolicyStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.Map; /** A Policy. */ -@JsonFlatten @Fluent -public class PolicyInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyInner.class); - - /* - * The description of the policy. - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * The status of the policy. - */ - @JsonProperty(value = "properties.status") - private PolicyStatus status; - - /* - * The fact name of the policy (e.g. LabVmCount, LabVmSize, - * MaxVmsAllowedPerLab, etc. - */ - @JsonProperty(value = "properties.factName") - private PolicyFactName factName; - - /* - * The fact data of the policy. - */ - @JsonProperty(value = "properties.factData") - private String factData; - +public final class PolicyInner extends Resource { /* - * The threshold of the policy (i.e. a number for MaxValuePolicy, and a - * JSON array of values for AllowedValuesPolicy). + * The properties of the resource. */ - @JsonProperty(value = "properties.threshold") - private String threshold; + @JsonProperty(value = "properties", required = true) + private PolicyProperties innerProperties = new PolicyProperties(); - /* - * The evaluator type of the policy (i.e. AllowedValuesPolicy, - * MaxValuePolicy). - */ - @JsonProperty(value = "properties.evaluatorType") - private PolicyEvaluatorType evaluatorType; - - /* - * The creation date of the policy. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDate; + private PolicyProperties innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public PolicyInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public PolicyInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the description property: The description of the policy. @@ -85,7 +52,7 @@ public class PolicyInner extends Resource { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -95,7 +62,10 @@ public String description() { * @return the PolicyInner object itself. */ public PolicyInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new PolicyProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -105,7 +75,7 @@ public PolicyInner withDescription(String description) { * @return the status value. */ public PolicyStatus status() { - return this.status; + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** @@ -115,7 +85,10 @@ public PolicyStatus status() { * @return the PolicyInner object itself. */ public PolicyInner withStatus(PolicyStatus status) { - this.status = status; + if (this.innerProperties() == null) { + this.innerProperties = new PolicyProperties(); + } + this.innerProperties().withStatus(status); return this; } @@ -125,7 +98,7 @@ public PolicyInner withStatus(PolicyStatus status) { * @return the factName value. */ public PolicyFactName factName() { - return this.factName; + return this.innerProperties() == null ? null : this.innerProperties().factName(); } /** @@ -135,7 +108,10 @@ public PolicyFactName factName() { * @return the PolicyInner object itself. */ public PolicyInner withFactName(PolicyFactName factName) { - this.factName = factName; + if (this.innerProperties() == null) { + this.innerProperties = new PolicyProperties(); + } + this.innerProperties().withFactName(factName); return this; } @@ -145,7 +121,7 @@ public PolicyInner withFactName(PolicyFactName factName) { * @return the factData value. */ public String factData() { - return this.factData; + return this.innerProperties() == null ? null : this.innerProperties().factData(); } /** @@ -155,7 +131,10 @@ public String factData() { * @return the PolicyInner object itself. */ public PolicyInner withFactData(String factData) { - this.factData = factData; + if (this.innerProperties() == null) { + this.innerProperties = new PolicyProperties(); + } + this.innerProperties().withFactData(factData); return this; } @@ -166,7 +145,7 @@ public PolicyInner withFactData(String factData) { * @return the threshold value. */ public String threshold() { - return this.threshold; + return this.innerProperties() == null ? null : this.innerProperties().threshold(); } /** @@ -177,7 +156,10 @@ public String threshold() { * @return the PolicyInner object itself. */ public PolicyInner withThreshold(String threshold) { - this.threshold = threshold; + if (this.innerProperties() == null) { + this.innerProperties = new PolicyProperties(); + } + this.innerProperties().withThreshold(threshold); return this; } @@ -187,7 +169,7 @@ public PolicyInner withThreshold(String threshold) { * @return the evaluatorType value. */ public PolicyEvaluatorType evaluatorType() { - return this.evaluatorType; + return this.innerProperties() == null ? null : this.innerProperties().evaluatorType(); } /** @@ -197,7 +179,10 @@ public PolicyEvaluatorType evaluatorType() { * @return the PolicyInner object itself. */ public PolicyInner withEvaluatorType(PolicyEvaluatorType evaluatorType) { - this.evaluatorType = evaluatorType; + if (this.innerProperties() == null) { + this.innerProperties = new PolicyProperties(); + } + this.innerProperties().withEvaluatorType(evaluatorType); return this; } @@ -207,7 +192,7 @@ public PolicyInner withEvaluatorType(PolicyEvaluatorType evaluatorType) { * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -216,7 +201,7 @@ public OffsetDateTime createdDate() { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -225,21 +210,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public PolicyInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public PolicyInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -248,5 +219,14 @@ public PolicyInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model PolicyInner")); + } else { + innerProperties().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(PolicyInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/PolicyProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/PolicyProperties.java new file mode 100644 index 000000000000..3ff129e61f2a --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/PolicyProperties.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.PolicyEvaluatorType; +import com.azure.resourcemanager.devtestlabs.models.PolicyFactName; +import com.azure.resourcemanager.devtestlabs.models.PolicyStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Properties of a Policy. */ +@Fluent +public final class PolicyProperties { + /* + * The description of the policy. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The status of the policy. + */ + @JsonProperty(value = "status") + private PolicyStatus status; + + /* + * The fact name of the policy (e.g. LabVmCount, LabVmSize, + * MaxVmsAllowedPerLab, etc. + */ + @JsonProperty(value = "factName") + private PolicyFactName factName; + + /* + * The fact data of the policy. + */ + @JsonProperty(value = "factData") + private String factData; + + /* + * The threshold of the policy (i.e. a number for MaxValuePolicy, and a + * JSON array of values for AllowedValuesPolicy). + */ + @JsonProperty(value = "threshold") + private String threshold; + + /* + * The evaluator type of the policy (i.e. AllowedValuesPolicy, + * MaxValuePolicy). + */ + @JsonProperty(value = "evaluatorType") + private PolicyEvaluatorType evaluatorType; + + /* + * The creation date of the policy. + */ + @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDate; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the description property: The description of the policy. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the policy. + * + * @param description the description value to set. + * @return the PolicyProperties object itself. + */ + public PolicyProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the status property: The status of the policy. + * + * @return the status value. + */ + public PolicyStatus status() { + return this.status; + } + + /** + * Set the status property: The status of the policy. + * + * @param status the status value to set. + * @return the PolicyProperties object itself. + */ + public PolicyProperties withStatus(PolicyStatus status) { + this.status = status; + return this; + } + + /** + * Get the factName property: The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. + * + * @return the factName value. + */ + public PolicyFactName factName() { + return this.factName; + } + + /** + * Set the factName property: The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. + * + * @param factName the factName value to set. + * @return the PolicyProperties object itself. + */ + public PolicyProperties withFactName(PolicyFactName factName) { + this.factName = factName; + return this; + } + + /** + * Get the factData property: The fact data of the policy. + * + * @return the factData value. + */ + public String factData() { + return this.factData; + } + + /** + * Set the factData property: The fact data of the policy. + * + * @param factData the factData value to set. + * @return the PolicyProperties object itself. + */ + public PolicyProperties withFactData(String factData) { + this.factData = factData; + return this; + } + + /** + * Get the threshold property: The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of + * values for AllowedValuesPolicy). + * + * @return the threshold value. + */ + public String threshold() { + return this.threshold; + } + + /** + * Set the threshold property: The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of + * values for AllowedValuesPolicy). + * + * @param threshold the threshold value to set. + * @return the PolicyProperties object itself. + */ + public PolicyProperties withThreshold(String threshold) { + this.threshold = threshold; + return this; + } + + /** + * Get the evaluatorType property: The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy). + * + * @return the evaluatorType value. + */ + public PolicyEvaluatorType evaluatorType() { + return this.evaluatorType; + } + + /** + * Set the evaluatorType property: The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy). + * + * @param evaluatorType the evaluatorType value to set. + * @return the PolicyProperties object itself. + */ + public PolicyProperties withEvaluatorType(PolicyEvaluatorType evaluatorType) { + this.evaluatorType = evaluatorType; + return this; + } + + /** + * Get the createdDate property: The creation date of the policy. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/RdpConnectionInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/RdpConnectionInner.java index 7ad0a5d049ea..20874f534cbc 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/RdpConnectionInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/RdpConnectionInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a .rdp file. */ @Fluent public final class RdpConnectionInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RdpConnectionInner.class); - /* * The contents of the .rdp file */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ScheduleCreationParameterProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ScheduleCreationParameterProperties.java new file mode 100644 index 000000000000..f99474cc6dbd --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ScheduleCreationParameterProperties.java @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.DayDetails; +import com.azure.resourcemanager.devtestlabs.models.EnableStatus; +import com.azure.resourcemanager.devtestlabs.models.HourDetails; +import com.azure.resourcemanager.devtestlabs.models.NotificationSettings; +import com.azure.resourcemanager.devtestlabs.models.WeekDetails; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties for schedule creation. */ +@Fluent +public final class ScheduleCreationParameterProperties { + /* + * The status of the schedule (i.e. Enabled, Disabled) + */ + @JsonProperty(value = "status") + private EnableStatus status; + + /* + * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + */ + @JsonProperty(value = "taskType") + private String taskType; + + /* + * If the schedule will occur only some days of the week, specify the + * weekly recurrence. + */ + @JsonProperty(value = "weeklyRecurrence") + private WeekDetails weeklyRecurrence; + + /* + * If the schedule will occur once each day of the week, specify the daily + * recurrence. + */ + @JsonProperty(value = "dailyRecurrence") + private DayDetails dailyRecurrence; + + /* + * If the schedule will occur multiple times a day, specify the hourly + * recurrence. + */ + @JsonProperty(value = "hourlyRecurrence") + private HourDetails hourlyRecurrence; + + /* + * The time zone ID (e.g. Pacific Standard time). + */ + @JsonProperty(value = "timeZoneId") + private String timeZoneId; + + /* + * Notification settings. + */ + @JsonProperty(value = "notificationSettings") + private NotificationSettings notificationSettings; + + /* + * The resource ID to which the schedule belongs + */ + @JsonProperty(value = "targetResourceId") + private String targetResourceId; + + /** + * Get the status property: The status of the schedule (i.e. Enabled, Disabled). + * + * @return the status value. + */ + public EnableStatus status() { + return this.status; + } + + /** + * Set the status property: The status of the schedule (i.e. Enabled, Disabled). + * + * @param status the status value to set. + * @return the ScheduleCreationParameterProperties object itself. + */ + public ScheduleCreationParameterProperties withStatus(EnableStatus status) { + this.status = status; + return this; + } + + /** + * Get the taskType property: The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * + * @return the taskType value. + */ + public String taskType() { + return this.taskType; + } + + /** + * Set the taskType property: The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * + * @param taskType the taskType value to set. + * @return the ScheduleCreationParameterProperties object itself. + */ + public ScheduleCreationParameterProperties withTaskType(String taskType) { + this.taskType = taskType; + return this; + } + + /** + * Get the weeklyRecurrence property: If the schedule will occur only some days of the week, specify the weekly + * recurrence. + * + * @return the weeklyRecurrence value. + */ + public WeekDetails weeklyRecurrence() { + return this.weeklyRecurrence; + } + + /** + * Set the weeklyRecurrence property: If the schedule will occur only some days of the week, specify the weekly + * recurrence. + * + * @param weeklyRecurrence the weeklyRecurrence value to set. + * @return the ScheduleCreationParameterProperties object itself. + */ + public ScheduleCreationParameterProperties withWeeklyRecurrence(WeekDetails weeklyRecurrence) { + this.weeklyRecurrence = weeklyRecurrence; + return this; + } + + /** + * Get the dailyRecurrence property: If the schedule will occur once each day of the week, specify the daily + * recurrence. + * + * @return the dailyRecurrence value. + */ + public DayDetails dailyRecurrence() { + return this.dailyRecurrence; + } + + /** + * Set the dailyRecurrence property: If the schedule will occur once each day of the week, specify the daily + * recurrence. + * + * @param dailyRecurrence the dailyRecurrence value to set. + * @return the ScheduleCreationParameterProperties object itself. + */ + public ScheduleCreationParameterProperties withDailyRecurrence(DayDetails dailyRecurrence) { + this.dailyRecurrence = dailyRecurrence; + return this; + } + + /** + * Get the hourlyRecurrence property: If the schedule will occur multiple times a day, specify the hourly + * recurrence. + * + * @return the hourlyRecurrence value. + */ + public HourDetails hourlyRecurrence() { + return this.hourlyRecurrence; + } + + /** + * Set the hourlyRecurrence property: If the schedule will occur multiple times a day, specify the hourly + * recurrence. + * + * @param hourlyRecurrence the hourlyRecurrence value to set. + * @return the ScheduleCreationParameterProperties object itself. + */ + public ScheduleCreationParameterProperties withHourlyRecurrence(HourDetails hourlyRecurrence) { + this.hourlyRecurrence = hourlyRecurrence; + return this; + } + + /** + * Get the timeZoneId property: The time zone ID (e.g. Pacific Standard time). + * + * @return the timeZoneId value. + */ + public String timeZoneId() { + return this.timeZoneId; + } + + /** + * Set the timeZoneId property: The time zone ID (e.g. Pacific Standard time). + * + * @param timeZoneId the timeZoneId value to set. + * @return the ScheduleCreationParameterProperties object itself. + */ + public ScheduleCreationParameterProperties withTimeZoneId(String timeZoneId) { + this.timeZoneId = timeZoneId; + return this; + } + + /** + * Get the notificationSettings property: Notification settings. + * + * @return the notificationSettings value. + */ + public NotificationSettings notificationSettings() { + return this.notificationSettings; + } + + /** + * Set the notificationSettings property: Notification settings. + * + * @param notificationSettings the notificationSettings value to set. + * @return the ScheduleCreationParameterProperties object itself. + */ + public ScheduleCreationParameterProperties withNotificationSettings(NotificationSettings notificationSettings) { + this.notificationSettings = notificationSettings; + return this; + } + + /** + * Get the targetResourceId property: The resource ID to which the schedule belongs. + * + * @return the targetResourceId value. + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the targetResourceId property: The resource ID to which the schedule belongs. + * + * @param targetResourceId the targetResourceId value to set. + * @return the ScheduleCreationParameterProperties object itself. + */ + public ScheduleCreationParameterProperties withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (weeklyRecurrence() != null) { + weeklyRecurrence().validate(); + } + if (dailyRecurrence() != null) { + dailyRecurrence().validate(); + } + if (hourlyRecurrence() != null) { + hourlyRecurrence().validate(); + } + if (notificationSettings() != null) { + notificationSettings().validate(); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ScheduleInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ScheduleInner.java index 21f71b94a9d1..1e953a0ee816 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ScheduleInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ScheduleInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.DayDetails; @@ -13,85 +12,41 @@ import com.azure.resourcemanager.devtestlabs.models.HourDetails; import com.azure.resourcemanager.devtestlabs.models.NotificationSettings; import com.azure.resourcemanager.devtestlabs.models.WeekDetails; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.Map; /** A schedule. */ -@JsonFlatten @Fluent -public class ScheduleInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleInner.class); - - /* - * The status of the schedule (i.e. Enabled, Disabled) - */ - @JsonProperty(value = "properties.status") - private EnableStatus status; - - /* - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - */ - @JsonProperty(value = "properties.taskType") - private String taskType; - - /* - * If the schedule will occur only some days of the week, specify the - * weekly recurrence. - */ - @JsonProperty(value = "properties.weeklyRecurrence") - private WeekDetails weeklyRecurrence; - - /* - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - */ - @JsonProperty(value = "properties.dailyRecurrence") - private DayDetails dailyRecurrence; - - /* - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - */ - @JsonProperty(value = "properties.hourlyRecurrence") - private HourDetails hourlyRecurrence; - +public final class ScheduleInner extends Resource { /* - * The time zone ID (e.g. Pacific Standard time). + * The properties of the resource. */ - @JsonProperty(value = "properties.timeZoneId") - private String timeZoneId; + @JsonProperty(value = "properties", required = true) + private ScheduleProperties innerProperties = new ScheduleProperties(); - /* - * Notification settings. - */ - @JsonProperty(value = "properties.notificationSettings") - private NotificationSettings notificationSettings; - - /* - * The creation date of the schedule. - */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDate; - - /* - * The resource ID to which the schedule belongs + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.targetResourceId") - private String targetResourceId; + private ScheduleProperties innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public ScheduleInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public ScheduleInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the status property: The status of the schedule (i.e. Enabled, Disabled). @@ -99,7 +54,7 @@ public class ScheduleInner extends Resource { * @return the status value. */ public EnableStatus status() { - return this.status; + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** @@ -109,7 +64,10 @@ public EnableStatus status() { * @return the ScheduleInner object itself. */ public ScheduleInner withStatus(EnableStatus status) { - this.status = status; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleProperties(); + } + this.innerProperties().withStatus(status); return this; } @@ -119,7 +77,7 @@ public ScheduleInner withStatus(EnableStatus status) { * @return the taskType value. */ public String taskType() { - return this.taskType; + return this.innerProperties() == null ? null : this.innerProperties().taskType(); } /** @@ -129,7 +87,10 @@ public String taskType() { * @return the ScheduleInner object itself. */ public ScheduleInner withTaskType(String taskType) { - this.taskType = taskType; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleProperties(); + } + this.innerProperties().withTaskType(taskType); return this; } @@ -140,7 +101,7 @@ public ScheduleInner withTaskType(String taskType) { * @return the weeklyRecurrence value. */ public WeekDetails weeklyRecurrence() { - return this.weeklyRecurrence; + return this.innerProperties() == null ? null : this.innerProperties().weeklyRecurrence(); } /** @@ -151,7 +112,10 @@ public WeekDetails weeklyRecurrence() { * @return the ScheduleInner object itself. */ public ScheduleInner withWeeklyRecurrence(WeekDetails weeklyRecurrence) { - this.weeklyRecurrence = weeklyRecurrence; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleProperties(); + } + this.innerProperties().withWeeklyRecurrence(weeklyRecurrence); return this; } @@ -162,7 +126,7 @@ public ScheduleInner withWeeklyRecurrence(WeekDetails weeklyRecurrence) { * @return the dailyRecurrence value. */ public DayDetails dailyRecurrence() { - return this.dailyRecurrence; + return this.innerProperties() == null ? null : this.innerProperties().dailyRecurrence(); } /** @@ -173,7 +137,10 @@ public DayDetails dailyRecurrence() { * @return the ScheduleInner object itself. */ public ScheduleInner withDailyRecurrence(DayDetails dailyRecurrence) { - this.dailyRecurrence = dailyRecurrence; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleProperties(); + } + this.innerProperties().withDailyRecurrence(dailyRecurrence); return this; } @@ -184,7 +151,7 @@ public ScheduleInner withDailyRecurrence(DayDetails dailyRecurrence) { * @return the hourlyRecurrence value. */ public HourDetails hourlyRecurrence() { - return this.hourlyRecurrence; + return this.innerProperties() == null ? null : this.innerProperties().hourlyRecurrence(); } /** @@ -195,7 +162,10 @@ public HourDetails hourlyRecurrence() { * @return the ScheduleInner object itself. */ public ScheduleInner withHourlyRecurrence(HourDetails hourlyRecurrence) { - this.hourlyRecurrence = hourlyRecurrence; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleProperties(); + } + this.innerProperties().withHourlyRecurrence(hourlyRecurrence); return this; } @@ -205,7 +175,7 @@ public ScheduleInner withHourlyRecurrence(HourDetails hourlyRecurrence) { * @return the timeZoneId value. */ public String timeZoneId() { - return this.timeZoneId; + return this.innerProperties() == null ? null : this.innerProperties().timeZoneId(); } /** @@ -215,7 +185,10 @@ public String timeZoneId() { * @return the ScheduleInner object itself. */ public ScheduleInner withTimeZoneId(String timeZoneId) { - this.timeZoneId = timeZoneId; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleProperties(); + } + this.innerProperties().withTimeZoneId(timeZoneId); return this; } @@ -225,7 +198,7 @@ public ScheduleInner withTimeZoneId(String timeZoneId) { * @return the notificationSettings value. */ public NotificationSettings notificationSettings() { - return this.notificationSettings; + return this.innerProperties() == null ? null : this.innerProperties().notificationSettings(); } /** @@ -235,7 +208,10 @@ public NotificationSettings notificationSettings() { * @return the ScheduleInner object itself. */ public ScheduleInner withNotificationSettings(NotificationSettings notificationSettings) { - this.notificationSettings = notificationSettings; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleProperties(); + } + this.innerProperties().withNotificationSettings(notificationSettings); return this; } @@ -245,7 +221,7 @@ public ScheduleInner withNotificationSettings(NotificationSettings notificationS * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -254,7 +230,7 @@ public OffsetDateTime createdDate() { * @return the targetResourceId value. */ public String targetResourceId() { - return this.targetResourceId; + return this.innerProperties() == null ? null : this.innerProperties().targetResourceId(); } /** @@ -264,7 +240,10 @@ public String targetResourceId() { * @return the ScheduleInner object itself. */ public ScheduleInner withTargetResourceId(String targetResourceId) { - this.targetResourceId = targetResourceId; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleProperties(); + } + this.innerProperties().withTargetResourceId(targetResourceId); return this; } @@ -274,7 +253,7 @@ public ScheduleInner withTargetResourceId(String targetResourceId) { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -283,21 +262,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public ScheduleInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduleInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -306,17 +271,14 @@ public ScheduleInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (weeklyRecurrence() != null) { - weeklyRecurrence().validate(); - } - if (dailyRecurrence() != null) { - dailyRecurrence().validate(); - } - if (hourlyRecurrence() != null) { - hourlyRecurrence().validate(); - } - if (notificationSettings() != null) { - notificationSettings().validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model ScheduleInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ScheduleInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ScheduleProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ScheduleProperties.java new file mode 100644 index 000000000000..28726c7f5636 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ScheduleProperties.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.DayDetails; +import com.azure.resourcemanager.devtestlabs.models.EnableStatus; +import com.azure.resourcemanager.devtestlabs.models.HourDetails; +import com.azure.resourcemanager.devtestlabs.models.NotificationSettings; +import com.azure.resourcemanager.devtestlabs.models.WeekDetails; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Properties of a schedule. */ +@Fluent +public final class ScheduleProperties { + /* + * The status of the schedule (i.e. Enabled, Disabled) + */ + @JsonProperty(value = "status") + private EnableStatus status; + + /* + * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + */ + @JsonProperty(value = "taskType") + private String taskType; + + /* + * If the schedule will occur only some days of the week, specify the + * weekly recurrence. + */ + @JsonProperty(value = "weeklyRecurrence") + private WeekDetails weeklyRecurrence; + + /* + * If the schedule will occur once each day of the week, specify the daily + * recurrence. + */ + @JsonProperty(value = "dailyRecurrence") + private DayDetails dailyRecurrence; + + /* + * If the schedule will occur multiple times a day, specify the hourly + * recurrence. + */ + @JsonProperty(value = "hourlyRecurrence") + private HourDetails hourlyRecurrence; + + /* + * The time zone ID (e.g. Pacific Standard time). + */ + @JsonProperty(value = "timeZoneId") + private String timeZoneId; + + /* + * Notification settings. + */ + @JsonProperty(value = "notificationSettings") + private NotificationSettings notificationSettings; + + /* + * The creation date of the schedule. + */ + @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDate; + + /* + * The resource ID to which the schedule belongs + */ + @JsonProperty(value = "targetResourceId") + private String targetResourceId; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the status property: The status of the schedule (i.e. Enabled, Disabled). + * + * @return the status value. + */ + public EnableStatus status() { + return this.status; + } + + /** + * Set the status property: The status of the schedule (i.e. Enabled, Disabled). + * + * @param status the status value to set. + * @return the ScheduleProperties object itself. + */ + public ScheduleProperties withStatus(EnableStatus status) { + this.status = status; + return this; + } + + /** + * Get the taskType property: The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * + * @return the taskType value. + */ + public String taskType() { + return this.taskType; + } + + /** + * Set the taskType property: The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). + * + * @param taskType the taskType value to set. + * @return the ScheduleProperties object itself. + */ + public ScheduleProperties withTaskType(String taskType) { + this.taskType = taskType; + return this; + } + + /** + * Get the weeklyRecurrence property: If the schedule will occur only some days of the week, specify the weekly + * recurrence. + * + * @return the weeklyRecurrence value. + */ + public WeekDetails weeklyRecurrence() { + return this.weeklyRecurrence; + } + + /** + * Set the weeklyRecurrence property: If the schedule will occur only some days of the week, specify the weekly + * recurrence. + * + * @param weeklyRecurrence the weeklyRecurrence value to set. + * @return the ScheduleProperties object itself. + */ + public ScheduleProperties withWeeklyRecurrence(WeekDetails weeklyRecurrence) { + this.weeklyRecurrence = weeklyRecurrence; + return this; + } + + /** + * Get the dailyRecurrence property: If the schedule will occur once each day of the week, specify the daily + * recurrence. + * + * @return the dailyRecurrence value. + */ + public DayDetails dailyRecurrence() { + return this.dailyRecurrence; + } + + /** + * Set the dailyRecurrence property: If the schedule will occur once each day of the week, specify the daily + * recurrence. + * + * @param dailyRecurrence the dailyRecurrence value to set. + * @return the ScheduleProperties object itself. + */ + public ScheduleProperties withDailyRecurrence(DayDetails dailyRecurrence) { + this.dailyRecurrence = dailyRecurrence; + return this; + } + + /** + * Get the hourlyRecurrence property: If the schedule will occur multiple times a day, specify the hourly + * recurrence. + * + * @return the hourlyRecurrence value. + */ + public HourDetails hourlyRecurrence() { + return this.hourlyRecurrence; + } + + /** + * Set the hourlyRecurrence property: If the schedule will occur multiple times a day, specify the hourly + * recurrence. + * + * @param hourlyRecurrence the hourlyRecurrence value to set. + * @return the ScheduleProperties object itself. + */ + public ScheduleProperties withHourlyRecurrence(HourDetails hourlyRecurrence) { + this.hourlyRecurrence = hourlyRecurrence; + return this; + } + + /** + * Get the timeZoneId property: The time zone ID (e.g. Pacific Standard time). + * + * @return the timeZoneId value. + */ + public String timeZoneId() { + return this.timeZoneId; + } + + /** + * Set the timeZoneId property: The time zone ID (e.g. Pacific Standard time). + * + * @param timeZoneId the timeZoneId value to set. + * @return the ScheduleProperties object itself. + */ + public ScheduleProperties withTimeZoneId(String timeZoneId) { + this.timeZoneId = timeZoneId; + return this; + } + + /** + * Get the notificationSettings property: Notification settings. + * + * @return the notificationSettings value. + */ + public NotificationSettings notificationSettings() { + return this.notificationSettings; + } + + /** + * Set the notificationSettings property: Notification settings. + * + * @param notificationSettings the notificationSettings value to set. + * @return the ScheduleProperties object itself. + */ + public ScheduleProperties withNotificationSettings(NotificationSettings notificationSettings) { + this.notificationSettings = notificationSettings; + return this; + } + + /** + * Get the createdDate property: The creation date of the schedule. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Get the targetResourceId property: The resource ID to which the schedule belongs. + * + * @return the targetResourceId value. + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the targetResourceId property: The resource ID to which the schedule belongs. + * + * @param targetResourceId the targetResourceId value to set. + * @return the ScheduleProperties object itself. + */ + public ScheduleProperties withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (weeklyRecurrence() != null) { + weeklyRecurrence().validate(); + } + if (dailyRecurrence() != null) { + dailyRecurrence().validate(); + } + if (hourlyRecurrence() != null) { + hourlyRecurrence().validate(); + } + if (notificationSettings() != null) { + notificationSettings().validate(); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/SecretInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/SecretInner.java index 3f6f0af07f97..11e1c271aca0 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/SecretInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/SecretInner.java @@ -5,36 +5,42 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** A secret. */ -@JsonFlatten @Fluent -public class SecretInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecretInner.class); - +public final class SecretInner extends Resource { /* - * The value of the secret for secret creation. + * The properties of the resource. */ - @JsonProperty(value = "properties.value") - private String value; + @JsonProperty(value = "properties", required = true) + private SecretProperties innerProperties = new SecretProperties(); - /* - * The provisioning status of the resource. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + private SecretProperties innerProperties() { + return this.innerProperties; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public SecretInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public SecretInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the value property: The value of the secret for secret creation. @@ -42,7 +48,7 @@ public class SecretInner extends Resource { * @return the value value. */ public String value() { - return this.value; + return this.innerProperties() == null ? null : this.innerProperties().value(); } /** @@ -52,7 +58,10 @@ public String value() { * @return the SecretInner object itself. */ public SecretInner withValue(String value) { - this.value = value; + if (this.innerProperties() == null) { + this.innerProperties = new SecretProperties(); + } + this.innerProperties().withValue(value); return this; } @@ -62,7 +71,7 @@ public SecretInner withValue(String value) { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -71,21 +80,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public SecretInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public SecretInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -94,5 +89,14 @@ public SecretInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model SecretInner")); + } else { + innerProperties().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(SecretInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/SecretProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/SecretProperties.java new file mode 100644 index 000000000000..79705b79aa4e --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/SecretProperties.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of a secret. */ +@Fluent +public final class SecretProperties { + /* + * The value of the secret for secret creation. + */ + @JsonProperty(value = "value") + private String value; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the value property: The value of the secret for secret creation. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value of the secret for secret creation. + * + * @param value the value value to set. + * @return the SecretProperties object itself. + */ + public SecretProperties withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ServiceFabricInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ServiceFabricInner.java index fcc1dbed870a..01fb030e5f30 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ServiceFabricInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ServiceFabricInner.java @@ -5,49 +5,42 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** A Service Fabric. */ -@JsonFlatten @Fluent -public class ServiceFabricInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceFabricInner.class); - - /* - * The backing service fabric resource's id - */ - @JsonProperty(value = "properties.externalServiceFabricId") - private String externalServiceFabricId; - +public final class ServiceFabricInner extends Resource { /* - * The resource id of the environment under which the service fabric - * resource is present + * The properties of the resource. */ - @JsonProperty(value = "properties.environmentId") - private String environmentId; + @JsonProperty(value = "properties", required = true) + private ServiceFabricPropertiesInner innerProperties = new ServiceFabricPropertiesInner(); - /* - * The applicable schedule for the virtual machine. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.applicableSchedule", access = JsonProperty.Access.WRITE_ONLY) - private ApplicableScheduleInner applicableSchedule; + private ServiceFabricPropertiesInner innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public ServiceFabricInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public ServiceFabricInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the externalServiceFabricId property: The backing service fabric resource's id. @@ -55,7 +48,7 @@ public class ServiceFabricInner extends Resource { * @return the externalServiceFabricId value. */ public String externalServiceFabricId() { - return this.externalServiceFabricId; + return this.innerProperties() == null ? null : this.innerProperties().externalServiceFabricId(); } /** @@ -65,7 +58,10 @@ public String externalServiceFabricId() { * @return the ServiceFabricInner object itself. */ public ServiceFabricInner withExternalServiceFabricId(String externalServiceFabricId) { - this.externalServiceFabricId = externalServiceFabricId; + if (this.innerProperties() == null) { + this.innerProperties = new ServiceFabricPropertiesInner(); + } + this.innerProperties().withExternalServiceFabricId(externalServiceFabricId); return this; } @@ -76,7 +72,7 @@ public ServiceFabricInner withExternalServiceFabricId(String externalServiceFabr * @return the environmentId value. */ public String environmentId() { - return this.environmentId; + return this.innerProperties() == null ? null : this.innerProperties().environmentId(); } /** @@ -87,7 +83,10 @@ public String environmentId() { * @return the ServiceFabricInner object itself. */ public ServiceFabricInner withEnvironmentId(String environmentId) { - this.environmentId = environmentId; + if (this.innerProperties() == null) { + this.innerProperties = new ServiceFabricPropertiesInner(); + } + this.innerProperties().withEnvironmentId(environmentId); return this; } @@ -97,7 +96,7 @@ public ServiceFabricInner withEnvironmentId(String environmentId) { * @return the applicableSchedule value. */ public ApplicableScheduleInner applicableSchedule() { - return this.applicableSchedule; + return this.innerProperties() == null ? null : this.innerProperties().applicableSchedule(); } /** @@ -106,7 +105,7 @@ public ApplicableScheduleInner applicableSchedule() { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -115,21 +114,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public ServiceFabricInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ServiceFabricInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -138,8 +123,15 @@ public ServiceFabricInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (applicableSchedule() != null) { - applicableSchedule().validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model ServiceFabricInner")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ServiceFabricInner.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ServiceFabricPropertiesInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ServiceFabricPropertiesInner.java new file mode 100644 index 000000000000..926a7e1bcecd --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ServiceFabricPropertiesInner.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of a service fabric. */ +@Fluent +public final class ServiceFabricPropertiesInner { + /* + * The backing service fabric resource's id + */ + @JsonProperty(value = "externalServiceFabricId") + private String externalServiceFabricId; + + /* + * The resource id of the environment under which the service fabric + * resource is present + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /* + * The applicable schedule for the virtual machine. + */ + @JsonProperty(value = "applicableSchedule", access = JsonProperty.Access.WRITE_ONLY) + private ApplicableScheduleInner applicableSchedule; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the externalServiceFabricId property: The backing service fabric resource's id. + * + * @return the externalServiceFabricId value. + */ + public String externalServiceFabricId() { + return this.externalServiceFabricId; + } + + /** + * Set the externalServiceFabricId property: The backing service fabric resource's id. + * + * @param externalServiceFabricId the externalServiceFabricId value to set. + * @return the ServiceFabricPropertiesInner object itself. + */ + public ServiceFabricPropertiesInner withExternalServiceFabricId(String externalServiceFabricId) { + this.externalServiceFabricId = externalServiceFabricId; + return this; + } + + /** + * Get the environmentId property: The resource id of the environment under which the service fabric resource is + * present. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: The resource id of the environment under which the service fabric resource is + * present. + * + * @param environmentId the environmentId value to set. + * @return the ServiceFabricPropertiesInner object itself. + */ + public ServiceFabricPropertiesInner withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the applicableSchedule property: The applicable schedule for the virtual machine. + * + * @return the applicableSchedule value. + */ + public ApplicableScheduleInner applicableSchedule() { + return this.applicableSchedule; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (applicableSchedule() != null) { + applicableSchedule().validate(); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ServiceRunnerInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ServiceRunnerInner.java index 3502af945969..069785cb6f27 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ServiceRunnerInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/ServiceRunnerInner.java @@ -6,17 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.IdentityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** A container for a managed identity to execute DevTest lab services. */ @Fluent public final class ServiceRunnerInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceRunnerInner.class); - /* * The identity of the resource. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/UserInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/UserInner.java index a502dbe76746..5ed9185e35d2 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/UserInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/UserInner.java @@ -5,51 +5,44 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.UserIdentity; import com.azure.resourcemanager.devtestlabs.models.UserSecretStore; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.Map; /** Profile of a lab user. */ -@JsonFlatten @Fluent -public class UserInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserInner.class); - - /* - * The identity of the user. - */ - @JsonProperty(value = "properties.identity") - private UserIdentity identity; - +public final class UserInner extends Resource { /* - * The secret store of the user. + * The properties of the resource. */ - @JsonProperty(value = "properties.secretStore") - private UserSecretStore secretStore; + @JsonProperty(value = "properties") + private UserProperties innerProperties; - /* - * The creation date of the user profile. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDate; + private UserProperties innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public UserInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public UserInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the identity property: The identity of the user. @@ -57,7 +50,7 @@ public class UserInner extends Resource { * @return the identity value. */ public UserIdentity identity() { - return this.identity; + return this.innerProperties() == null ? null : this.innerProperties().identity(); } /** @@ -67,7 +60,10 @@ public UserIdentity identity() { * @return the UserInner object itself. */ public UserInner withIdentity(UserIdentity identity) { - this.identity = identity; + if (this.innerProperties() == null) { + this.innerProperties = new UserProperties(); + } + this.innerProperties().withIdentity(identity); return this; } @@ -77,7 +73,7 @@ public UserInner withIdentity(UserIdentity identity) { * @return the secretStore value. */ public UserSecretStore secretStore() { - return this.secretStore; + return this.innerProperties() == null ? null : this.innerProperties().secretStore(); } /** @@ -87,7 +83,10 @@ public UserSecretStore secretStore() { * @return the UserInner object itself. */ public UserInner withSecretStore(UserSecretStore secretStore) { - this.secretStore = secretStore; + if (this.innerProperties() == null) { + this.innerProperties = new UserProperties(); + } + this.innerProperties().withSecretStore(secretStore); return this; } @@ -97,7 +96,7 @@ public UserInner withSecretStore(UserSecretStore secretStore) { * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -106,7 +105,7 @@ public OffsetDateTime createdDate() { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -115,21 +114,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public UserInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public UserInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -138,11 +123,8 @@ public UserInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (identity() != null) { - identity().validate(); - } - if (secretStore() != null) { - secretStore().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/UserProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/UserProperties.java new file mode 100644 index 000000000000..a3a8ff4bf500 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/UserProperties.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.UserIdentity; +import com.azure.resourcemanager.devtestlabs.models.UserSecretStore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Properties of a lab user profile. */ +@Fluent +public final class UserProperties { + /* + * The identity of the user. + */ + @JsonProperty(value = "identity") + private UserIdentity identity; + + /* + * The secret store of the user. + */ + @JsonProperty(value = "secretStore") + private UserSecretStore secretStore; + + /* + * The creation date of the user profile. + */ + @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDate; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the identity property: The identity of the user. + * + * @return the identity value. + */ + public UserIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the user. + * + * @param identity the identity value to set. + * @return the UserProperties object itself. + */ + public UserProperties withIdentity(UserIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the secretStore property: The secret store of the user. + * + * @return the secretStore value. + */ + public UserSecretStore secretStore() { + return this.secretStore; + } + + /** + * Set the secretStore property: The secret store of the user. + * + * @param secretStore the secretStore value to set. + * @return the UserProperties object itself. + */ + public UserProperties withSecretStore(UserSecretStore secretStore) { + this.secretStore = secretStore; + return this; + } + + /** + * Get the createdDate property: The creation date of the user profile. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (secretStore() != null) { + secretStore().validate(); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/VirtualNetworkInner.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/VirtualNetworkInner.java index 80f7fd88eee8..50194d1bb673 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/VirtualNetworkInner.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/VirtualNetworkInner.java @@ -5,71 +5,46 @@ package com.azure.resourcemanager.devtestlabs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.models.ExternalSubnet; import com.azure.resourcemanager.devtestlabs.models.Subnet; import com.azure.resourcemanager.devtestlabs.models.SubnetOverride; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** A virtual network. */ -@JsonFlatten @Fluent -public class VirtualNetworkInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkInner.class); - - /* - * The allowed subnets of the virtual network. - */ - @JsonProperty(value = "properties.allowedSubnets") - private List allowedSubnets; - - /* - * The description of the virtual network. - */ - @JsonProperty(value = "properties.description") - private String description; - +public final class VirtualNetworkInner extends Resource { /* - * The Microsoft.Network resource identifier of the virtual network. + * The properties of the resource. */ - @JsonProperty(value = "properties.externalProviderResourceId") - private String externalProviderResourceId; + @JsonProperty(value = "properties") + private VirtualNetworkProperties innerProperties; - /* - * The external subnet properties. - */ - @JsonProperty(value = "properties.externalSubnets", access = JsonProperty.Access.WRITE_ONLY) - private List externalSubnets; - - /* - * The subnet overrides of the virtual network. - */ - @JsonProperty(value = "properties.subnetOverrides") - private List subnetOverrides; - - /* - * The creation date of the virtual network. + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDate; + private VirtualNetworkProperties innerProperties() { + return this.innerProperties; + } - /* - * The provisioning status of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + /** {@inheritDoc} */ + @Override + public VirtualNetworkInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The unique immutable identifier of a resource (Guid). - */ - @JsonProperty(value = "properties.uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String uniqueIdentifier; + /** {@inheritDoc} */ + @Override + public VirtualNetworkInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the allowedSubnets property: The allowed subnets of the virtual network. @@ -77,7 +52,7 @@ public class VirtualNetworkInner extends Resource { * @return the allowedSubnets value. */ public List allowedSubnets() { - return this.allowedSubnets; + return this.innerProperties() == null ? null : this.innerProperties().allowedSubnets(); } /** @@ -87,7 +62,10 @@ public List allowedSubnets() { * @return the VirtualNetworkInner object itself. */ public VirtualNetworkInner withAllowedSubnets(List allowedSubnets) { - this.allowedSubnets = allowedSubnets; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualNetworkProperties(); + } + this.innerProperties().withAllowedSubnets(allowedSubnets); return this; } @@ -97,7 +75,7 @@ public VirtualNetworkInner withAllowedSubnets(List allowedSubnets) { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -107,7 +85,10 @@ public String description() { * @return the VirtualNetworkInner object itself. */ public VirtualNetworkInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualNetworkProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -117,7 +98,7 @@ public VirtualNetworkInner withDescription(String description) { * @return the externalProviderResourceId value. */ public String externalProviderResourceId() { - return this.externalProviderResourceId; + return this.innerProperties() == null ? null : this.innerProperties().externalProviderResourceId(); } /** @@ -127,7 +108,10 @@ public String externalProviderResourceId() { * @return the VirtualNetworkInner object itself. */ public VirtualNetworkInner withExternalProviderResourceId(String externalProviderResourceId) { - this.externalProviderResourceId = externalProviderResourceId; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualNetworkProperties(); + } + this.innerProperties().withExternalProviderResourceId(externalProviderResourceId); return this; } @@ -137,7 +121,7 @@ public VirtualNetworkInner withExternalProviderResourceId(String externalProvide * @return the externalSubnets value. */ public List externalSubnets() { - return this.externalSubnets; + return this.innerProperties() == null ? null : this.innerProperties().externalSubnets(); } /** @@ -146,7 +130,7 @@ public List externalSubnets() { * @return the subnetOverrides value. */ public List subnetOverrides() { - return this.subnetOverrides; + return this.innerProperties() == null ? null : this.innerProperties().subnetOverrides(); } /** @@ -156,7 +140,10 @@ public List subnetOverrides() { * @return the VirtualNetworkInner object itself. */ public VirtualNetworkInner withSubnetOverrides(List subnetOverrides) { - this.subnetOverrides = subnetOverrides; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualNetworkProperties(); + } + this.innerProperties().withSubnetOverrides(subnetOverrides); return this; } @@ -166,7 +153,7 @@ public VirtualNetworkInner withSubnetOverrides(List subnetOverri * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -175,7 +162,7 @@ public OffsetDateTime createdDate() { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -184,21 +171,7 @@ public String provisioningState() { * @return the uniqueIdentifier value. */ public String uniqueIdentifier() { - return this.uniqueIdentifier; - } - - /** {@inheritDoc} */ - @Override - public VirtualNetworkInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public VirtualNetworkInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier(); } /** @@ -207,14 +180,8 @@ public VirtualNetworkInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (allowedSubnets() != null) { - allowedSubnets().forEach(e -> e.validate()); - } - if (externalSubnets() != null) { - externalSubnets().forEach(e -> e.validate()); - } - if (subnetOverrides() != null) { - subnetOverrides().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/VirtualNetworkProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/VirtualNetworkProperties.java new file mode 100644 index 000000000000..704fd88dfdfb --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/VirtualNetworkProperties.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devtestlabs.models.ExternalSubnet; +import com.azure.resourcemanager.devtestlabs.models.Subnet; +import com.azure.resourcemanager.devtestlabs.models.SubnetOverride; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Properties of a virtual network. */ +@Fluent +public final class VirtualNetworkProperties { + /* + * The allowed subnets of the virtual network. + */ + @JsonProperty(value = "allowedSubnets") + private List allowedSubnets; + + /* + * The description of the virtual network. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The Microsoft.Network resource identifier of the virtual network. + */ + @JsonProperty(value = "externalProviderResourceId") + private String externalProviderResourceId; + + /* + * The external subnet properties. + */ + @JsonProperty(value = "externalSubnets", access = JsonProperty.Access.WRITE_ONLY) + private List externalSubnets; + + /* + * The subnet overrides of the virtual network. + */ + @JsonProperty(value = "subnetOverrides") + private List subnetOverrides; + + /* + * The creation date of the virtual network. + */ + @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDate; + + /* + * The provisioning status of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The unique immutable identifier of a resource (Guid). + */ + @JsonProperty(value = "uniqueIdentifier", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueIdentifier; + + /** + * Get the allowedSubnets property: The allowed subnets of the virtual network. + * + * @return the allowedSubnets value. + */ + public List allowedSubnets() { + return this.allowedSubnets; + } + + /** + * Set the allowedSubnets property: The allowed subnets of the virtual network. + * + * @param allowedSubnets the allowedSubnets value to set. + * @return the VirtualNetworkProperties object itself. + */ + public VirtualNetworkProperties withAllowedSubnets(List allowedSubnets) { + this.allowedSubnets = allowedSubnets; + return this; + } + + /** + * Get the description property: The description of the virtual network. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the virtual network. + * + * @param description the description value to set. + * @return the VirtualNetworkProperties object itself. + */ + public VirtualNetworkProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the externalProviderResourceId property: The Microsoft.Network resource identifier of the virtual network. + * + * @return the externalProviderResourceId value. + */ + public String externalProviderResourceId() { + return this.externalProviderResourceId; + } + + /** + * Set the externalProviderResourceId property: The Microsoft.Network resource identifier of the virtual network. + * + * @param externalProviderResourceId the externalProviderResourceId value to set. + * @return the VirtualNetworkProperties object itself. + */ + public VirtualNetworkProperties withExternalProviderResourceId(String externalProviderResourceId) { + this.externalProviderResourceId = externalProviderResourceId; + return this; + } + + /** + * Get the externalSubnets property: The external subnet properties. + * + * @return the externalSubnets value. + */ + public List externalSubnets() { + return this.externalSubnets; + } + + /** + * Get the subnetOverrides property: The subnet overrides of the virtual network. + * + * @return the subnetOverrides value. + */ + public List subnetOverrides() { + return this.subnetOverrides; + } + + /** + * Set the subnetOverrides property: The subnet overrides of the virtual network. + * + * @param subnetOverrides the subnetOverrides value to set. + * @return the VirtualNetworkProperties object itself. + */ + public VirtualNetworkProperties withSubnetOverrides(List subnetOverrides) { + this.subnetOverrides = subnetOverrides; + return this; + } + + /** + * Get the createdDate property: The creation date of the virtual network. + * + * @return the createdDate value. + */ + public OffsetDateTime createdDate() { + return this.createdDate; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + public String uniqueIdentifier() { + return this.uniqueIdentifier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (allowedSubnets() != null) { + allowedSubnets().forEach(e -> e.validate()); + } + if (externalSubnets() != null) { + externalSubnets().forEach(e -> e.validate()); + } + if (subnetOverrides() != null) { + subnetOverrides().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ApplicableSchedulePropertiesImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ApplicableSchedulePropertiesImpl.java new file mode 100644 index 000000000000..2d6612e90348 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ApplicableSchedulePropertiesImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.implementation; + +import com.azure.resourcemanager.devtestlabs.fluent.models.ApplicableSchedulePropertiesInner; +import com.azure.resourcemanager.devtestlabs.fluent.models.ScheduleInner; +import com.azure.resourcemanager.devtestlabs.models.ApplicableScheduleProperties; +import com.azure.resourcemanager.devtestlabs.models.Schedule; + +public final class ApplicableSchedulePropertiesImpl implements ApplicableScheduleProperties { + private ApplicableSchedulePropertiesInner innerObject; + + private final com.azure.resourcemanager.devtestlabs.DevTestLabsManager serviceManager; + + ApplicableSchedulePropertiesImpl( + ApplicableSchedulePropertiesInner innerObject, + com.azure.resourcemanager.devtestlabs.DevTestLabsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Schedule labVmsShutdown() { + ScheduleInner inner = this.innerModel().labVmsShutdown(); + if (inner != null) { + return new ScheduleImpl(inner, this.manager()); + } else { + return null; + } + } + + public Schedule labVmsStartup() { + ScheduleInner inner = this.innerModel().labVmsStartup(); + if (inner != null) { + return new ScheduleImpl(inner, this.manager()); + } else { + return null; + } + } + + public ApplicableSchedulePropertiesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArmTemplatesClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArmTemplatesClientImpl.java index da3764a72fae..99fa12e4ebcc 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArmTemplatesClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArmTemplatesClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.ArmTemplatesClient; import com.azure.resourcemanager.devtestlabs.fluent.models.ArmTemplateInner; import com.azure.resourcemanager.devtestlabs.models.ArmTemplateList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in ArmTemplatesClient. */ public final class ArmTemplatesClientImpl implements ArmTemplatesClient { - private final ClientLogger logger = new ClientLogger(ArmTemplatesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ArmTemplatesService service; @@ -121,7 +118,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -199,7 +197,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -274,7 +273,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -299,7 +298,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName, String artifactSourceName) { @@ -326,7 +325,7 @@ private PagedFlux listAsync(String resourceGroupName, String l * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -354,7 +353,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName, String artifactSourceName) { @@ -380,7 +379,7 @@ public PagedIterable list(String resourceGroupName, String lab * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -407,7 +406,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure resource manager template. + * @return azure resource manager template along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -469,7 +468,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure resource manager template. + * @return azure resource manager template along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -532,7 +531,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure resource manager template. + * @return azure resource manager template on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -558,7 +557,7 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure resource manager template. + * @return azure resource manager template on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -605,7 +604,7 @@ public ArmTemplateInner get(String resourceGroupName, String labName, String art * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure resource manager template. + * @return azure resource manager template along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -625,7 +624,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -661,7 +661,8 @@ private Mono> listNextSinglePageAsync(String nex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArmTemplatesImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArmTemplatesImpl.java index 16f8a21ed215..1d9d1b360210 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArmTemplatesImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArmTemplatesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.ArmTemplateInner; import com.azure.resourcemanager.devtestlabs.models.ArmTemplate; import com.azure.resourcemanager.devtestlabs.models.ArmTemplates; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ArmTemplatesImpl implements ArmTemplates { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmTemplatesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ArmTemplatesImpl.class); private final ArmTemplatesClient innerClient; diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactSourcesClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactSourcesClientImpl.java index 980ba7a0e5d3..3ad164f6e5ce 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactSourcesClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactSourcesClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.ArtifactSourcesClient; import com.azure.resourcemanager.devtestlabs.fluent.models.ArtifactSourceInner; import com.azure.resourcemanager.devtestlabs.models.ArtifactSourceFragment; @@ -38,8 +37,6 @@ /** An instance of this class provides access to all the operations defined in ArtifactSourcesClient. */ public final class ArtifactSourcesClientImpl implements ArtifactSourcesClient { - private final ClientLogger logger = new ClientLogger(ArtifactSourcesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ArtifactSourcesService service; @@ -173,7 +170,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -239,7 +237,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -307,7 +306,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -325,7 +324,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName) { @@ -351,7 +350,7 @@ private PagedFlux listAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -375,7 +374,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName) { @@ -399,7 +398,7 @@ public PagedIterable list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -423,7 +422,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact source. + * @return artifact source along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -479,7 +478,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact source. + * @return artifact source along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -531,7 +530,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact source. + * @return artifact source on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name, String expand) { @@ -555,7 +554,7 @@ private Mono getAsync(String resourceGroupName, String labN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact source. + * @return artifact source on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name) { @@ -599,7 +598,7 @@ public ArtifactSourceInner get(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact source. + * @return artifact source along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -617,7 +616,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an artifact source. + * @return properties of an artifact source along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -678,7 +677,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an artifact source. + * @return properties of an artifact source along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -735,7 +734,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an artifact source. + * @return properties of an artifact source on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -780,7 +779,7 @@ public ArtifactSourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an artifact source. + * @return properties of an artifact source along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -797,7 +796,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String labName, String name) { @@ -850,7 +849,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -900,7 +899,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String name) { @@ -932,7 +931,7 @@ public void delete(String resourceGroupName, String labName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context) { @@ -949,7 +948,7 @@ public Response deleteWithResponse(String resourceGroupName, String labNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an artifact source. + * @return properties of an artifact source along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1010,7 +1009,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an artifact source. + * @return properties of an artifact source along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1067,7 +1066,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an artifact source. + * @return properties of an artifact source on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1112,7 +1111,7 @@ public ArtifactSourceInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an artifact source. + * @return properties of an artifact source along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1127,7 +1126,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1163,7 +1163,8 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactSourcesImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactSourcesImpl.java index 74e26b05001f..42fa6674ef0e 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactSourcesImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactSourcesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.ArtifactSourceInner; import com.azure.resourcemanager.devtestlabs.models.ArtifactSource; import com.azure.resourcemanager.devtestlabs.models.ArtifactSources; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ArtifactSourcesImpl implements ArtifactSources { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactSourcesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ArtifactSourcesImpl.class); private final ArtifactSourcesClient innerClient; @@ -81,7 +80,7 @@ public Response deleteWithResponse(String resourceGroupName, String labNam public ArtifactSource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -89,14 +88,14 @@ public ArtifactSource getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "artifactsources"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -109,7 +108,7 @@ public ArtifactSource getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -117,14 +116,14 @@ public Response getByIdWithResponse(String id, String expand, Co } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "artifactsources"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -136,7 +135,7 @@ public Response getByIdWithResponse(String id, String expand, Co public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -144,26 +143,26 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "artifactsources"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'artifactsources'.", id))); } - this.deleteWithResponse(resourceGroupName, labName, name, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, labName, name, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -171,14 +170,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "artifactsources"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactsClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactsClientImpl.java index 01411fbb8b05..249a04e6a11a 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactsClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactsClientImpl.java @@ -27,7 +27,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.ArtifactsClient; import com.azure.resourcemanager.devtestlabs.fluent.models.ArmTemplateInfoInner; import com.azure.resourcemanager.devtestlabs.fluent.models.ArtifactInner; @@ -37,8 +36,6 @@ /** An instance of this class provides access to all the operations defined in ArtifactsClient. */ public final class ArtifactsClientImpl implements ArtifactsClient { - private final ClientLogger logger = new ClientLogger(ArtifactsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ArtifactsService service; @@ -143,7 +140,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -221,7 +219,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -296,7 +295,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -321,7 +320,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName, String artifactSourceName) { @@ -348,7 +347,7 @@ private PagedFlux listAsync(String resourceGroupName, String labN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -376,7 +375,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName, String artifactSourceName) { @@ -402,7 +401,7 @@ public PagedIterable list(String resourceGroupName, String labNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -429,7 +428,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact. + * @return artifact along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -491,7 +490,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact. + * @return artifact along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -554,7 +553,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact. + * @return artifact on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -580,7 +579,7 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact. + * @return artifact on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -627,7 +626,7 @@ public ArtifactInner get(String resourceGroupName, String labName, String artifa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact. + * @return artifact along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -652,7 +651,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a generated ARM template. + * @return information about a generated ARM template along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> generateArmTemplateWithResponseAsync( @@ -727,7 +727,8 @@ private Mono> generateArmTemplateWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a generated ARM template. + * @return information about a generated ARM template along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> generateArmTemplateWithResponseAsync( @@ -799,7 +800,7 @@ private Mono> generateArmTemplateWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a generated ARM template. + * @return information about a generated ARM template on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono generateArmTemplateAsync( @@ -859,7 +860,7 @@ public ArmTemplateInfoInner generateArmTemplate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a generated ARM template. + * @return information about a generated ARM template along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response generateArmTemplateWithResponse( @@ -881,7 +882,8 @@ public Response generateArmTemplateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -917,7 +919,8 @@ private Mono> listNextSinglePageAsync(String nextLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactsImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactsImpl.java index ac03443ada82..2eb3e9748255 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactsImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ArtifactsImpl.java @@ -16,10 +16,9 @@ import com.azure.resourcemanager.devtestlabs.models.Artifact; import com.azure.resourcemanager.devtestlabs.models.Artifacts; import com.azure.resourcemanager.devtestlabs.models.GenerateArmTemplateRequest; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ArtifactsImpl implements Artifacts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ArtifactsImpl.class); private final ArtifactsClient innerClient; diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CostsClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CostsClientImpl.java index a9ef6f533d92..35a19987cd5c 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CostsClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CostsClientImpl.java @@ -23,15 +23,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.CostsClient; import com.azure.resourcemanager.devtestlabs.fluent.models.LabCostInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in CostsClient. */ public final class CostsClientImpl implements CostsClient { - private final ClientLogger logger = new ClientLogger(CostsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final CostsService service; @@ -100,7 +97,7 @@ Mono> createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cost. + * @return cost along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -156,7 +153,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cost. + * @return cost along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -208,7 +205,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cost. + * @return cost on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name, String expand) { @@ -232,7 +229,7 @@ private Mono getAsync(String resourceGroupName, String labName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cost. + * @return cost on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name) { @@ -276,7 +273,7 @@ public LabCostInner get(String resourceGroupName, String labName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cost. + * @return cost along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -294,7 +291,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost item. + * @return a cost item along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -355,7 +352,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost item. + * @return a cost item along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -412,7 +409,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost item. + * @return a cost item on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -456,7 +453,7 @@ public LabCostInner createOrUpdate(String resourceGroupName, String labName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost item. + * @return a cost item along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CostsImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CostsImpl.java index d0f81cdb7314..8ecc2a386522 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CostsImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CostsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.LabCostInner; import com.azure.resourcemanager.devtestlabs.models.Costs; import com.azure.resourcemanager.devtestlabs.models.LabCost; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class CostsImpl implements Costs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CostsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CostsImpl.class); private final CostsClient innerClient; @@ -53,7 +52,7 @@ public Response getWithResponse( public LabCost getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -61,14 +60,14 @@ public LabCost getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "costs"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'costs'.", id))); @@ -80,7 +79,7 @@ public LabCost getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -88,14 +87,14 @@ public Response getByIdWithResponse(String id, String expand, Context c } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "costs"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'costs'.", id))); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CustomImagesClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CustomImagesClientImpl.java index 99372da0c00e..9e867b6893d7 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CustomImagesClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CustomImagesClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.CustomImagesClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in CustomImagesClient. */ public final class CustomImagesClientImpl implements CustomImagesClient { - private final ClientLogger logger = new ClientLogger(CustomImagesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final CustomImagesService service; @@ -178,7 +175,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -244,7 +242,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -312,7 +311,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -330,7 +329,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName) { @@ -356,7 +355,7 @@ private PagedFlux listAsync(String resourceGroupName, String l * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -380,7 +379,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName) { @@ -404,7 +403,7 @@ public PagedIterable list(String resourceGroupName, String lab * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -428,7 +427,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom image. + * @return custom image along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -484,7 +483,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom image. + * @return custom image along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -536,7 +535,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom image. + * @return custom image on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name, String expand) { @@ -560,7 +559,7 @@ private Mono getAsync(String resourceGroupName, String labName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom image. + * @return custom image on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name) { @@ -604,7 +603,7 @@ public CustomImageInner get(String resourceGroupName, String labName, String nam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom image. + * @return custom image along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -622,7 +621,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return a custom image along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -683,7 +682,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return a custom image along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -740,9 +739,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return the {@link PollerFlux} for polling of a custom image. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CustomImageInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String name, CustomImageInner customImage) { Mono>> mono = @@ -750,7 +749,11 @@ private PollerFlux, CustomImageInner> beginCreateOr return this .client .getLroResult( - mono, this.client.getHttpPipeline(), CustomImageInner.class, CustomImageInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + CustomImageInner.class, + CustomImageInner.class, + this.client.getContext()); } /** @@ -764,9 +767,9 @@ private PollerFlux, CustomImageInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return the {@link PollerFlux} for polling of a custom image. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CustomImageInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String name, CustomImageInner customImage, Context context) { context = this.client.mergeContext(context); @@ -788,9 +791,9 @@ private PollerFlux, CustomImageInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return the {@link SyncPoller} for polling of a custom image. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CustomImageInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, CustomImageInner customImage) { return beginCreateOrUpdateAsync(resourceGroupName, labName, name, customImage).getSyncPoller(); @@ -807,9 +810,9 @@ public SyncPoller, CustomImageInner> beginCreateOrU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return the {@link SyncPoller} for polling of a custom image. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CustomImageInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, CustomImageInner customImage, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, labName, name, customImage, context).getSyncPoller(); @@ -825,7 +828,7 @@ public SyncPoller, CustomImageInner> beginCreateOrU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return a custom image on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -846,7 +849,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return a custom image on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -902,7 +905,7 @@ public CustomImageInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -956,7 +959,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1006,14 +1009,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String labName, String name) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, labName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1026,9 +1030,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String labName, String name, Context context) { context = this.client.mergeContext(context); @@ -1047,9 +1051,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String labName, String name) { return beginDeleteAsync(resourceGroupName, labName, name).getSyncPoller(); } @@ -1064,9 +1068,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String name, Context context) { return beginDeleteAsync(resourceGroupName, labName, name, context).getSyncPoller(); @@ -1081,7 +1085,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String name) { @@ -1098,7 +1102,7 @@ private Mono deleteAsync(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String name, Context context) { @@ -1148,7 +1152,7 @@ public void delete(String resourceGroupName, String labName, String name, Contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return a custom image along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1209,7 +1213,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return a custom image along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1266,7 +1270,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return a custom image on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1311,7 +1315,7 @@ public CustomImageInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a custom image. + * @return a custom image along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1326,7 +1330,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1362,7 +1367,8 @@ private Mono> listNextSinglePageAsync(String nex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CustomImagesImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CustomImagesImpl.java index 397ca97fa4ed..e9a3e717806f 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CustomImagesImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/CustomImagesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.CustomImageInner; import com.azure.resourcemanager.devtestlabs.models.CustomImage; import com.azure.resourcemanager.devtestlabs.models.CustomImages; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class CustomImagesImpl implements CustomImages { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomImagesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CustomImagesImpl.class); private final CustomImagesClient innerClient; @@ -81,7 +80,7 @@ public void delete(String resourceGroupName, String labName, String name, Contex public CustomImage getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -89,14 +88,14 @@ public CustomImage getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "customimages"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'customimages'.", id))); @@ -108,7 +107,7 @@ public CustomImage getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -116,14 +115,14 @@ public Response getByIdWithResponse(String id, String expand, Conte } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "customimages"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'customimages'.", id))); @@ -134,7 +133,7 @@ public Response getByIdWithResponse(String id, String expand, Conte public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -142,14 +141,14 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "customimages"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'customimages'.", id))); @@ -160,7 +159,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -168,14 +167,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "customimages"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'customimages'.", id))); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/DevTestLabsClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/DevTestLabsClientImpl.java index db91d517d785..88e6d6606b9a 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/DevTestLabsClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/DevTestLabsClientImpl.java @@ -60,8 +60,6 @@ /** Initializes a new instance of the DevTestLabsClientImpl type. */ @ServiceClient(builder = DevTestLabsClientBuilder.class) public final class DevTestLabsClientImpl implements DevTestLabsClient { - private final ClientLogger logger = new ClientLogger(DevTestLabsClientImpl.class); - /** The subscription ID. */ private final String subscriptionId; @@ -567,7 +565,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -626,4 +624,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(DevTestLabsClientImpl.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/DisksClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/DisksClientImpl.java index bb987f61fa98..efbb6d0fb775 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/DisksClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/DisksClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.DisksClient; @@ -46,8 +45,6 @@ /** An instance of this class provides access to all the operations defined in DisksClient. */ public final class DisksClientImpl implements DisksClient { - private final ClientLogger logger = new ClientLogger(DisksClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DisksService service; @@ -222,7 +219,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -299,7 +297,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -373,7 +372,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -398,7 +397,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName, String username) { @@ -425,7 +424,7 @@ private PagedFlux listAsync(String resourceGroupName, String labName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -451,7 +450,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName, String username) { @@ -476,7 +475,7 @@ public PagedIterable list(String resourceGroupName, String labName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -503,7 +502,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk. + * @return disk along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -564,7 +563,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk. + * @return disk along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -621,7 +620,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk. + * @return disk on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -647,7 +646,7 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk. + * @return disk on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String username, String name) { @@ -693,7 +692,7 @@ public DiskInner get(String resourceGroupName, String labName, String username, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk. + * @return disk along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -712,7 +711,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return a Disk along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -778,7 +777,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return a Disk along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -840,9 +839,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return the {@link PollerFlux} for polling of a Disk. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DiskInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String username, String name, DiskInner disk) { Mono>> mono = @@ -850,7 +849,7 @@ private PollerFlux, DiskInner> beginCreateOrUpdateAsync( return this .client .getLroResult( - mono, this.client.getHttpPipeline(), DiskInner.class, DiskInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), DiskInner.class, DiskInner.class, this.client.getContext()); } /** @@ -865,9 +864,9 @@ private PollerFlux, DiskInner> beginCreateOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return the {@link PollerFlux} for polling of a Disk. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DiskInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String username, String name, DiskInner disk, Context context) { context = this.client.mergeContext(context); @@ -890,9 +889,9 @@ private PollerFlux, DiskInner> beginCreateOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return the {@link SyncPoller} for polling of a Disk. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DiskInner> beginCreateOrUpdate( String resourceGroupName, String labName, String username, String name, DiskInner disk) { return beginCreateOrUpdateAsync(resourceGroupName, labName, username, name, disk).getSyncPoller(); @@ -910,9 +909,9 @@ public SyncPoller, DiskInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return the {@link SyncPoller} for polling of a Disk. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DiskInner> beginCreateOrUpdate( String resourceGroupName, String labName, String username, String name, DiskInner disk, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, labName, username, name, disk, context).getSyncPoller(); @@ -929,7 +928,7 @@ public SyncPoller, DiskInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return a Disk on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -951,7 +950,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return a Disk on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -1010,7 +1009,7 @@ public DiskInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1069,7 +1068,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1124,15 +1123,16 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String labName, String username, String name) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, labName, username, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1146,9 +1146,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String labName, String username, String name, Context context) { context = this.client.mergeContext(context); @@ -1169,9 +1169,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String username, String name) { return beginDeleteAsync(resourceGroupName, labName, username, name).getSyncPoller(); @@ -1188,9 +1188,9 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String username, String name, Context context) { return beginDeleteAsync(resourceGroupName, labName, username, name, context).getSyncPoller(); @@ -1206,7 +1206,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String username, String name) { @@ -1226,7 +1226,7 @@ private Mono deleteAsync(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1280,7 +1280,7 @@ public void delete(String resourceGroupName, String labName, String username, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return a Disk along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1346,7 +1346,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return a Disk along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1408,7 +1408,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return a Disk on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1454,7 +1454,7 @@ public DiskInner update(String resourceGroupName, String labName, String usernam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Disk. + * @return a Disk along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1473,7 +1473,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> attachWithResponseAsync( @@ -1544,7 +1544,7 @@ private Mono>> attachWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> attachWithResponseAsync( @@ -1612,9 +1612,9 @@ private Mono>> attachWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginAttachAsync( String resourceGroupName, String labName, @@ -1625,7 +1625,8 @@ private PollerFlux, Void> beginAttachAsync( attachWithResponseAsync(resourceGroupName, labName, username, name, attachDiskProperties); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1640,9 +1641,9 @@ private PollerFlux, Void> beginAttachAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginAttachAsync( String resourceGroupName, String labName, @@ -1669,9 +1670,9 @@ private PollerFlux, Void> beginAttachAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginAttach( String resourceGroupName, String labName, @@ -1693,9 +1694,9 @@ public SyncPoller, Void> beginAttach( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginAttach( String resourceGroupName, String labName, @@ -1718,7 +1719,7 @@ public SyncPoller, Void> beginAttach( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono attachAsync( @@ -1744,7 +1745,7 @@ private Mono attachAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono attachAsync( @@ -1817,7 +1818,7 @@ public void attach( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> detachWithResponseAsync( @@ -1889,7 +1890,7 @@ private Mono>> detachWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> detachWithResponseAsync( @@ -1958,9 +1959,9 @@ private Mono>> detachWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDetachAsync( String resourceGroupName, String labName, @@ -1971,7 +1972,8 @@ private PollerFlux, Void> beginDetachAsync( detachWithResponseAsync(resourceGroupName, labName, username, name, detachDiskProperties); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1987,9 +1989,9 @@ private PollerFlux, Void> beginDetachAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDetachAsync( String resourceGroupName, String labName, @@ -2017,9 +2019,9 @@ private PollerFlux, Void> beginDetachAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDetach( String resourceGroupName, String labName, @@ -2042,9 +2044,9 @@ public SyncPoller, Void> beginDetach( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDetach( String resourceGroupName, String labName, @@ -2068,7 +2070,7 @@ public SyncPoller, Void> beginDetach( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono detachAsync( @@ -2095,7 +2097,7 @@ private Mono detachAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono detachAsync( @@ -2165,7 +2167,8 @@ public void detach( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2201,7 +2204,8 @@ private Mono> listNextSinglePageAsync(String nextLink) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/DisksImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/DisksImpl.java index 565a3870f4b4..2281c4da3b3c 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/DisksImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/DisksImpl.java @@ -15,10 +15,9 @@ import com.azure.resourcemanager.devtestlabs.models.DetachDiskProperties; import com.azure.resourcemanager.devtestlabs.models.Disk; import com.azure.resourcemanager.devtestlabs.models.Disks; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DisksImpl implements Disks { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DisksImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DisksImpl.class); private final DisksClient innerClient; @@ -121,7 +120,7 @@ public void detach( public Disk getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -129,21 +128,21 @@ public Disk getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "disks"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); @@ -155,7 +154,7 @@ public Disk getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -163,21 +162,21 @@ public Response getByIdWithResponse(String id, String expand, Context cont } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "disks"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); @@ -188,7 +187,7 @@ public Response getByIdWithResponse(String id, String expand, Context cont public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -196,21 +195,21 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "disks"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); @@ -221,7 +220,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -229,21 +228,21 @@ public void deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "disks"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/EnvironmentsClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/EnvironmentsClientImpl.java index 4d2a24c43e5a..3046fb60d2c5 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/EnvironmentsClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/EnvironmentsClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.EnvironmentsClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in EnvironmentsClient. */ public final class EnvironmentsClientImpl implements EnvironmentsClient { - private final ClientLogger logger = new ClientLogger(EnvironmentsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final EnvironmentsService service; @@ -184,7 +181,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -261,7 +259,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -335,7 +334,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -360,7 +359,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName, String username) { @@ -387,7 +386,7 @@ private PagedFlux listAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -413,7 +412,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName, String username) { @@ -438,7 +437,7 @@ public PagedIterable list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -465,7 +464,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment. + * @return environment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -526,7 +525,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment. + * @return environment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -583,7 +582,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment. + * @return environment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -609,7 +608,7 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment. + * @return environment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String username, String name) { @@ -655,7 +654,7 @@ public DtlEnvironmentInner get(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment. + * @return environment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -674,7 +673,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return an environment, which is essentially an ARM template deployment along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -740,7 +740,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return an environment, which is essentially an ARM template deployment along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -807,9 +808,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return the {@link PollerFlux} for polling of an environment, which is essentially an ARM template deployment. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DtlEnvironmentInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String username, String name, DtlEnvironmentInner dtlEnvironment) { Mono>> mono = @@ -821,7 +822,7 @@ private PollerFlux, DtlEnvironmentInner> beginCr this.client.getHttpPipeline(), DtlEnvironmentInner.class, DtlEnvironmentInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -836,9 +837,9 @@ private PollerFlux, DtlEnvironmentInner> beginCr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return the {@link PollerFlux} for polling of an environment, which is essentially an ARM template deployment. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DtlEnvironmentInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, @@ -866,9 +867,9 @@ private PollerFlux, DtlEnvironmentInner> beginCr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return the {@link SyncPoller} for polling of an environment, which is essentially an ARM template deployment. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DtlEnvironmentInner> beginCreateOrUpdate( String resourceGroupName, String labName, String username, String name, DtlEnvironmentInner dtlEnvironment) { return beginCreateOrUpdateAsync(resourceGroupName, labName, username, name, dtlEnvironment).getSyncPoller(); @@ -886,9 +887,9 @@ public SyncPoller, DtlEnvironmentInner> beginCre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return the {@link SyncPoller} for polling of an environment, which is essentially an ARM template deployment. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DtlEnvironmentInner> beginCreateOrUpdate( String resourceGroupName, String labName, @@ -911,7 +912,7 @@ public SyncPoller, DtlEnvironmentInner> beginCre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return an environment, which is essentially an ARM template deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -933,7 +934,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return an environment, which is essentially an ARM template deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -1002,7 +1003,7 @@ public DtlEnvironmentInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1061,7 +1062,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1116,15 +1117,16 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String labName, String username, String name) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, labName, username, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1138,9 +1140,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String labName, String username, String name, Context context) { context = this.client.mergeContext(context); @@ -1161,9 +1163,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String username, String name) { return beginDeleteAsync(resourceGroupName, labName, username, name).getSyncPoller(); @@ -1180,9 +1182,9 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String username, String name, Context context) { return beginDeleteAsync(resourceGroupName, labName, username, name, context).getSyncPoller(); @@ -1198,7 +1200,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String username, String name) { @@ -1218,7 +1220,7 @@ private Mono deleteAsync(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1272,7 +1274,8 @@ public void delete(String resourceGroupName, String labName, String username, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return an environment, which is essentially an ARM template deployment along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1338,7 +1341,8 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return an environment, which is essentially an ARM template deployment along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1405,7 +1409,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return an environment, which is essentially an ARM template deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1452,7 +1456,7 @@ public DtlEnvironmentInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment, which is essentially an ARM template deployment. + * @return an environment, which is essentially an ARM template deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1472,7 +1476,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1508,7 +1513,8 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/EnvironmentsImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/EnvironmentsImpl.java index 398728482f71..68d7507ab691 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/EnvironmentsImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/EnvironmentsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.DtlEnvironmentInner; import com.azure.resourcemanager.devtestlabs.models.DtlEnvironment; import com.azure.resourcemanager.devtestlabs.models.Environments; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class EnvironmentsImpl implements Environments { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(EnvironmentsImpl.class); private final EnvironmentsClient innerClient; @@ -82,7 +81,7 @@ public void delete(String resourceGroupName, String labName, String username, St public DtlEnvironment getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -90,21 +89,21 @@ public DtlEnvironment getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "environments"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); @@ -116,7 +115,7 @@ public DtlEnvironment getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -124,21 +123,21 @@ public Response getByIdWithResponse(String id, String expand, Co } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "environments"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); @@ -149,7 +148,7 @@ public Response getByIdWithResponse(String id, String expand, Co public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -157,21 +156,21 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "environments"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); @@ -182,7 +181,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -190,21 +189,21 @@ public void deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "environments"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/FormulasClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/FormulasClientImpl.java index e60243fca89b..97b8afda2cab 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/FormulasClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/FormulasClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.FormulasClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in FormulasClient. */ public final class FormulasClientImpl implements FormulasClient { - private final ClientLogger logger = new ClientLogger(FormulasClientImpl.class); - /** The proxy service used to perform REST calls. */ private final FormulasService service; @@ -177,7 +174,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -243,7 +241,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -311,7 +310,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -329,7 +328,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName) { @@ -355,7 +354,7 @@ private PagedFlux listAsync(String resourceGroupName, String labNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -379,7 +378,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName) { @@ -403,7 +402,7 @@ public PagedIterable list(String resourceGroupName, String labName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -427,7 +426,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return formula. + * @return formula along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -483,7 +482,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return formula. + * @return formula along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -535,7 +534,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return formula. + * @return formula on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name, String expand) { @@ -559,7 +558,7 @@ private Mono getAsync(String resourceGroupName, String labName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return formula. + * @return formula on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name) { @@ -603,7 +602,7 @@ public FormulaInner get(String resourceGroupName, String labName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return formula. + * @return formula along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -621,7 +620,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return a formula for creating a VM, specifying an image base and other parameters along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -682,7 +682,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return a formula for creating a VM, specifying an image base and other parameters along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -739,9 +740,10 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return the {@link PollerFlux} for polling of a formula for creating a VM, specifying an image base and other + * parameters. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, FormulaInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String name, FormulaInner formula) { Mono>> mono = @@ -749,7 +751,7 @@ private PollerFlux, FormulaInner> beginCreateOrUpdateAs return this .client .getLroResult( - mono, this.client.getHttpPipeline(), FormulaInner.class, FormulaInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), FormulaInner.class, FormulaInner.class, this.client.getContext()); } /** @@ -763,9 +765,10 @@ private PollerFlux, FormulaInner> beginCreateOrUpdateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return the {@link PollerFlux} for polling of a formula for creating a VM, specifying an image base and other + * parameters. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, FormulaInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String name, FormulaInner formula, Context context) { context = this.client.mergeContext(context); @@ -787,9 +790,10 @@ private PollerFlux, FormulaInner> beginCreateOrUpdateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return the {@link SyncPoller} for polling of a formula for creating a VM, specifying an image base and other + * parameters. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FormulaInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, FormulaInner formula) { return beginCreateOrUpdateAsync(resourceGroupName, labName, name, formula).getSyncPoller(); @@ -806,9 +810,10 @@ public SyncPoller, FormulaInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return the {@link SyncPoller} for polling of a formula for creating a VM, specifying an image base and other + * parameters. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FormulaInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, FormulaInner formula, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, labName, name, formula, context).getSyncPoller(); @@ -824,7 +829,8 @@ public SyncPoller, FormulaInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return a formula for creating a VM, specifying an image base and other parameters on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -845,7 +851,8 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return a formula for creating a VM, specifying an image base and other parameters on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -900,7 +907,7 @@ public FormulaInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String labName, String name) { @@ -953,7 +960,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -1003,7 +1010,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String name) { @@ -1035,7 +1042,7 @@ public void delete(String resourceGroupName, String labName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context) { @@ -1052,7 +1059,8 @@ public Response deleteWithResponse(String resourceGroupName, String labNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return a formula for creating a VM, specifying an image base and other parameters along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1113,7 +1121,8 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return a formula for creating a VM, specifying an image base and other parameters along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1170,7 +1179,8 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return a formula for creating a VM, specifying an image base and other parameters on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1214,7 +1224,7 @@ public FormulaInner update(String resourceGroupName, String labName, String name * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a formula for creating a VM, specifying an image base and other parameters. + * @return a formula for creating a VM, specifying an image base and other parameters along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1229,7 +1239,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1265,7 +1276,8 @@ private Mono> listNextSinglePageAsync(String nextLin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/FormulasImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/FormulasImpl.java index 306392b1b660..b9d0a10811e0 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/FormulasImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/FormulasImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.FormulaInner; import com.azure.resourcemanager.devtestlabs.models.Formula; import com.azure.resourcemanager.devtestlabs.models.Formulas; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class FormulasImpl implements Formulas { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FormulasImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(FormulasImpl.class); private final FormulasClient innerClient; @@ -81,7 +80,7 @@ public Response deleteWithResponse(String resourceGroupName, String labNam public Formula getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -89,14 +88,14 @@ public Formula getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "formulas"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'formulas'.", id))); @@ -108,7 +107,7 @@ public Formula getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -116,14 +115,14 @@ public Response getByIdWithResponse(String id, String expand, Context c } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "formulas"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'formulas'.", id))); @@ -134,7 +133,7 @@ public Response getByIdWithResponse(String id, String expand, Context c public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -142,25 +141,25 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "formulas"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'formulas'.", id))); } - this.deleteWithResponse(resourceGroupName, labName, name, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, labName, name, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -168,14 +167,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "formulas"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'formulas'.", id))); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GalleryImagesClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GalleryImagesClientImpl.java index 4ae6d24210e0..39cfc669d75e 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GalleryImagesClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GalleryImagesClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.GalleryImagesClient; import com.azure.resourcemanager.devtestlabs.fluent.models.GalleryImageInner; import com.azure.resourcemanager.devtestlabs.models.GalleryImageList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in GalleryImagesClient. */ public final class GalleryImagesClientImpl implements GalleryImagesClient { - private final ClientLogger logger = new ClientLogger(GalleryImagesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final GalleryImagesService service; @@ -101,7 +98,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -167,7 +165,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -235,7 +234,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -253,7 +252,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName) { @@ -279,7 +278,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -303,7 +302,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName) { @@ -327,7 +326,7 @@ public PagedIterable list(String resourceGroupName, String la * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -348,7 +347,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -384,7 +384,8 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GalleryImagesImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GalleryImagesImpl.java index 9edd83a3fa2a..545e61fdd41e 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GalleryImagesImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GalleryImagesImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.GalleryImageInner; import com.azure.resourcemanager.devtestlabs.models.GalleryImage; import com.azure.resourcemanager.devtestlabs.models.GalleryImages; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class GalleryImagesImpl implements GalleryImages { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GalleryImagesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(GalleryImagesImpl.class); private final GalleryImagesClient innerClient; diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GlobalSchedulesClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GlobalSchedulesClientImpl.java index 06eace1f8e65..2f3b69f62f5c 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GlobalSchedulesClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GlobalSchedulesClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.GlobalSchedulesClient; @@ -45,8 +44,6 @@ /** An instance of this class provides access to all the operations defined in GlobalSchedulesClient. */ public final class GlobalSchedulesClientImpl implements GlobalSchedulesClient { - private final ClientLogger logger = new ClientLogger(GlobalSchedulesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final GlobalSchedulesService service; @@ -229,7 +226,8 @@ Mono> listByResourceGroupNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -284,7 +282,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -335,7 +334,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String expand, String filter, Integer top, String orderby) { @@ -349,7 +348,7 @@ private PagedFlux listAsync(String expand, String filter, Integer * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -373,7 +372,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -388,7 +387,7 @@ private PagedFlux listAsync( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -410,7 +409,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -429,7 +428,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -490,7 +490,8 @@ private Mono> listByResourceGroupSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -547,7 +548,7 @@ private Mono> listByResourceGroupSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -564,7 +565,7 @@ private PagedFlux listByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -589,7 +590,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -606,7 +607,7 @@ private PagedFlux listByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -629,7 +630,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup( @@ -646,7 +647,7 @@ public PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -697,7 +698,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -744,7 +745,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String name, String expand) { @@ -767,7 +768,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String name) { @@ -809,7 +810,7 @@ public ScheduleInner getByResourceGroup(String resourceGroupName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -826,7 +827,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -882,7 +883,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -934,7 +935,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String name, ScheduleInner schedule) { @@ -975,7 +976,7 @@ public ScheduleInner createOrUpdate(String resourceGroupName, String name, Sched * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -991,7 +992,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String name) { @@ -1039,7 +1040,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String name, Context context) { @@ -1083,7 +1084,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String name) { @@ -1113,7 +1114,7 @@ public void delete(String resourceGroupName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String name, Context context) { @@ -1129,7 +1130,7 @@ public Response deleteWithResponse(String resourceGroupName, String name, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1185,7 +1186,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1237,7 +1238,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String name, ScheduleFragment schedule) { @@ -1278,7 +1279,7 @@ public ScheduleInner update(String resourceGroupName, String name, ScheduleFragm * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1294,7 +1295,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> executeWithResponseAsync(String resourceGroupName, String name) { @@ -1342,7 +1343,7 @@ private Mono>> executeWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> executeWithResponseAsync( @@ -1387,14 +1388,15 @@ private Mono>> executeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginExecuteAsync(String resourceGroupName, String name) { Mono>> mono = executeWithResponseAsync(resourceGroupName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1406,9 +1408,9 @@ private PollerFlux, Void> beginExecuteAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginExecuteAsync( String resourceGroupName, String name, Context context) { context = this.client.mergeContext(context); @@ -1426,9 +1428,9 @@ private PollerFlux, Void> beginExecuteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginExecute(String resourceGroupName, String name) { return beginExecuteAsync(resourceGroupName, name).getSyncPoller(); } @@ -1442,9 +1444,9 @@ public SyncPoller, Void> beginExecute(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginExecute(String resourceGroupName, String name, Context context) { return beginExecuteAsync(resourceGroupName, name, context).getSyncPoller(); } @@ -1457,7 +1459,7 @@ public SyncPoller, Void> beginExecute(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono executeAsync(String resourceGroupName, String name) { @@ -1473,7 +1475,7 @@ private Mono executeAsync(String resourceGroupName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono executeAsync(String resourceGroupName, String name, Context context) { @@ -1520,7 +1522,7 @@ public void execute(String resourceGroupName, String name, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> retargetWithResponseAsync( @@ -1579,7 +1581,7 @@ private Mono>> retargetWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> retargetWithResponseAsync( @@ -1634,16 +1636,17 @@ private Mono>> retargetWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRetargetAsync( String resourceGroupName, String name, RetargetScheduleProperties retargetScheduleProperties) { Mono>> mono = retargetWithResponseAsync(resourceGroupName, name, retargetScheduleProperties); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1656,9 +1659,9 @@ private PollerFlux, Void> beginRetargetAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRetargetAsync( String resourceGroupName, String name, RetargetScheduleProperties retargetScheduleProperties, Context context) { context = this.client.mergeContext(context); @@ -1678,9 +1681,9 @@ private PollerFlux, Void> beginRetargetAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRetarget( String resourceGroupName, String name, RetargetScheduleProperties retargetScheduleProperties) { return beginRetargetAsync(resourceGroupName, name, retargetScheduleProperties).getSyncPoller(); @@ -1696,9 +1699,9 @@ public SyncPoller, Void> beginRetarget( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRetarget( String resourceGroupName, String name, RetargetScheduleProperties retargetScheduleProperties, Context context) { return beginRetargetAsync(resourceGroupName, name, retargetScheduleProperties, context).getSyncPoller(); @@ -1713,7 +1716,7 @@ public SyncPoller, Void> beginRetarget( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono retargetAsync( @@ -1733,7 +1736,7 @@ private Mono retargetAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono retargetAsync( @@ -1782,7 +1785,8 @@ public void retarget( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1819,7 +1823,8 @@ private Mono> listBySubscriptionNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { @@ -1854,7 +1859,8 @@ private Mono> listBySubscriptionNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1891,7 +1897,8 @@ private Mono> listByResourceGroupNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GlobalSchedulesImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GlobalSchedulesImpl.java index a7f5e1579014..4079f86a6ed9 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GlobalSchedulesImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/GlobalSchedulesImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.devtestlabs.models.GlobalSchedules; import com.azure.resourcemanager.devtestlabs.models.RetargetScheduleProperties; import com.azure.resourcemanager.devtestlabs.models.Schedule; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class GlobalSchedulesImpl implements GlobalSchedules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GlobalSchedulesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(GlobalSchedulesImpl.class); private final GlobalSchedulesClient innerClient; @@ -103,7 +102,7 @@ public void retarget( public Schedule getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -111,7 +110,7 @@ public Schedule getById(String id) { } String name = Utils.getValueFromIdByName(id, "schedules"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); @@ -123,7 +122,7 @@ public Schedule getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -131,7 +130,7 @@ public Response getByIdWithResponse(String id, String expand, Context } String name = Utils.getValueFromIdByName(id, "schedules"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); @@ -142,7 +141,7 @@ public Response getByIdWithResponse(String id, String expand, Context public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -150,18 +149,18 @@ public void deleteById(String id) { } String name = Utils.getValueFromIdByName(id, "schedules"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); } - this.deleteWithResponse(resourceGroupName, name, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, name, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -169,7 +168,7 @@ public Response deleteByIdWithResponse(String id, Context context) { } String name = Utils.getValueFromIdByName(id, "schedules"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/LabVirtualMachinePropertiesImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/LabVirtualMachinePropertiesImpl.java new file mode 100644 index 000000000000..b6459cbfd9cb --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/LabVirtualMachinePropertiesImpl.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.implementation; + +import com.azure.resourcemanager.devtestlabs.fluent.models.ApplicableScheduleInner; +import com.azure.resourcemanager.devtestlabs.fluent.models.LabVirtualMachinePropertiesInner; +import com.azure.resourcemanager.devtestlabs.models.ApplicableSchedule; +import com.azure.resourcemanager.devtestlabs.models.ArtifactDeploymentStatusProperties; +import com.azure.resourcemanager.devtestlabs.models.ArtifactInstallProperties; +import com.azure.resourcemanager.devtestlabs.models.ComputeVmProperties; +import com.azure.resourcemanager.devtestlabs.models.DataDiskProperties; +import com.azure.resourcemanager.devtestlabs.models.GalleryImageReference; +import com.azure.resourcemanager.devtestlabs.models.LabVirtualMachineProperties; +import com.azure.resourcemanager.devtestlabs.models.NetworkInterfaceProperties; +import com.azure.resourcemanager.devtestlabs.models.ScheduleCreationParameter; +import com.azure.resourcemanager.devtestlabs.models.VirtualMachineCreationSource; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class LabVirtualMachinePropertiesImpl implements LabVirtualMachineProperties { + private LabVirtualMachinePropertiesInner innerObject; + + private final com.azure.resourcemanager.devtestlabs.DevTestLabsManager serviceManager; + + LabVirtualMachinePropertiesImpl( + LabVirtualMachinePropertiesInner innerObject, + com.azure.resourcemanager.devtestlabs.DevTestLabsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String notes() { + return this.innerModel().notes(); + } + + public String ownerObjectId() { + return this.innerModel().ownerObjectId(); + } + + public String ownerUserPrincipalName() { + return this.innerModel().ownerUserPrincipalName(); + } + + public String createdByUserId() { + return this.innerModel().createdByUserId(); + } + + public String createdByUser() { + return this.innerModel().createdByUser(); + } + + public OffsetDateTime createdDate() { + return this.innerModel().createdDate(); + } + + public String computeId() { + return this.innerModel().computeId(); + } + + public String customImageId() { + return this.innerModel().customImageId(); + } + + public String osType() { + return this.innerModel().osType(); + } + + public String size() { + return this.innerModel().size(); + } + + public String username() { + return this.innerModel().username(); + } + + public String password() { + return this.innerModel().password(); + } + + public String sshKey() { + return this.innerModel().sshKey(); + } + + public Boolean isAuthenticationWithSshKey() { + return this.innerModel().isAuthenticationWithSshKey(); + } + + public String fqdn() { + return this.innerModel().fqdn(); + } + + public String labSubnetName() { + return this.innerModel().labSubnetName(); + } + + public String labVirtualNetworkId() { + return this.innerModel().labVirtualNetworkId(); + } + + public Boolean disallowPublicIpAddress() { + return this.innerModel().disallowPublicIpAddress(); + } + + public List artifacts() { + List inner = this.innerModel().artifacts(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ArtifactDeploymentStatusProperties artifactDeploymentStatus() { + return this.innerModel().artifactDeploymentStatus(); + } + + public GalleryImageReference galleryImageReference() { + return this.innerModel().galleryImageReference(); + } + + public String planId() { + return this.innerModel().planId(); + } + + public ComputeVmProperties computeVm() { + return this.innerModel().computeVm(); + } + + public NetworkInterfaceProperties networkInterface() { + return this.innerModel().networkInterface(); + } + + public ApplicableSchedule applicableSchedule() { + ApplicableScheduleInner inner = this.innerModel().applicableSchedule(); + if (inner != null) { + return new ApplicableScheduleImpl(inner, this.manager()); + } else { + return null; + } + } + + public OffsetDateTime expirationDate() { + return this.innerModel().expirationDate(); + } + + public Boolean allowClaim() { + return this.innerModel().allowClaim(); + } + + public String storageType() { + return this.innerModel().storageType(); + } + + public VirtualMachineCreationSource virtualMachineCreationSource() { + return this.innerModel().virtualMachineCreationSource(); + } + + public String environmentId() { + return this.innerModel().environmentId(); + } + + public List dataDiskParameters() { + List inner = this.innerModel().dataDiskParameters(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List scheduleParameters() { + List inner = this.innerModel().scheduleParameters(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String lastKnownPowerState() { + return this.innerModel().lastKnownPowerState(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public String uniqueIdentifier() { + return this.innerModel().uniqueIdentifier(); + } + + public LabVirtualMachinePropertiesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/LabsClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/LabsClientImpl.java index 9bb8b8514d2f..9d5d55cfe751 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/LabsClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/LabsClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.LabsClient; @@ -51,8 +50,6 @@ /** An instance of this class provides access to all the operations defined in LabsClient. */ public final class LabsClientImpl implements LabsClient { - private final ClientLogger logger = new ClientLogger(LabsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final LabsService service; @@ -305,7 +302,8 @@ Mono> listVhdsNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -360,7 +358,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -411,7 +410,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String expand, String filter, Integer top, String orderby) { @@ -425,7 +424,7 @@ private PagedFlux listAsync(String expand, String filter, Integer top, * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -449,7 +448,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String expand, String filter, Integer top, String orderby, Context context) { @@ -463,7 +462,7 @@ private PagedFlux listAsync(String expand, String filter, Integer top, * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -485,7 +484,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String expand, String filter, Integer top, String orderby, Context context) { @@ -503,7 +502,8 @@ public PagedIterable list(String expand, String filter, Integer top, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -564,7 +564,8 @@ private Mono> listByResourceGroupSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -621,7 +622,7 @@ private Mono> listByResourceGroupSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -638,7 +639,7 @@ private PagedFlux listByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -663,7 +664,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -680,7 +681,7 @@ private PagedFlux listByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -703,7 +704,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup( @@ -720,7 +721,7 @@ public PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lab. + * @return lab along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -771,7 +772,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lab. + * @return lab along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -818,7 +819,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lab. + * @return lab on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String name, String expand) { @@ -841,7 +842,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lab. + * @return lab on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String name) { @@ -883,7 +884,7 @@ public LabInner getByResourceGroup(String resourceGroupName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lab. + * @return lab along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -900,7 +901,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return a lab along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -956,7 +957,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return a lab along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -1008,16 +1009,16 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return the {@link PollerFlux} for polling of a lab. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LabInner> beginCreateOrUpdateAsync( String resourceGroupName, String name, LabInner lab) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, name, lab); return this .client .getLroResult( - mono, this.client.getHttpPipeline(), LabInner.class, LabInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), LabInner.class, LabInner.class, this.client.getContext()); } /** @@ -1030,9 +1031,9 @@ private PollerFlux, LabInner> beginCreateOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return the {@link PollerFlux} for polling of a lab. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LabInner> beginCreateOrUpdateAsync( String resourceGroupName, String name, LabInner lab, Context context) { context = this.client.mergeContext(context); @@ -1052,9 +1053,9 @@ private PollerFlux, LabInner> beginCreateOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return the {@link SyncPoller} for polling of a lab. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LabInner> beginCreateOrUpdate( String resourceGroupName, String name, LabInner lab) { return beginCreateOrUpdateAsync(resourceGroupName, name, lab).getSyncPoller(); @@ -1070,9 +1071,9 @@ public SyncPoller, LabInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return the {@link SyncPoller} for polling of a lab. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LabInner> beginCreateOrUpdate( String resourceGroupName, String name, LabInner lab, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, name, lab, context).getSyncPoller(); @@ -1087,7 +1088,7 @@ public SyncPoller, LabInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return a lab on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String name, LabInner lab) { @@ -1106,7 +1107,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String name * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return a lab on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String name, LabInner lab, Context context) { @@ -1156,7 +1157,7 @@ public LabInner createOrUpdate(String resourceGroupName, String name, LabInner l * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String name) { @@ -1204,7 +1205,7 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1249,14 +1250,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String name) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1268,9 +1270,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String name, Context context) { context = this.client.mergeContext(context); @@ -1288,9 +1290,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String name) { return beginDeleteAsync(resourceGroupName, name).getSyncPoller(); } @@ -1304,9 +1306,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context) { return beginDeleteAsync(resourceGroupName, name, context).getSyncPoller(); } @@ -1319,7 +1321,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String name) { @@ -1335,7 +1337,7 @@ private Mono deleteAsync(String resourceGroupName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String name, Context context) { @@ -1380,7 +1382,7 @@ public void delete(String resourceGroupName, String name, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return a lab along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String resourceGroupName, String name, LabFragment lab) { @@ -1435,7 +1437,7 @@ private Mono> updateWithResponseAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return a lab along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1487,7 +1489,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return a lab on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String name, LabFragment lab) { @@ -1528,7 +1530,7 @@ public LabInner update(String resourceGroupName, String name, LabFragment lab) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a lab. + * @return a lab along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1544,7 +1546,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> claimAnyVmWithResponseAsync(String resourceGroupName, String name) { @@ -1592,7 +1594,7 @@ private Mono>> claimAnyVmWithResponseAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> claimAnyVmWithResponseAsync( @@ -1637,14 +1639,15 @@ private Mono>> claimAnyVmWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginClaimAnyVmAsync(String resourceGroupName, String name) { Mono>> mono = claimAnyVmWithResponseAsync(resourceGroupName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1656,9 +1659,9 @@ private PollerFlux, Void> beginClaimAnyVmAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginClaimAnyVmAsync( String resourceGroupName, String name, Context context) { context = this.client.mergeContext(context); @@ -1676,9 +1679,9 @@ private PollerFlux, Void> beginClaimAnyVmAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginClaimAnyVm(String resourceGroupName, String name) { return beginClaimAnyVmAsync(resourceGroupName, name).getSyncPoller(); } @@ -1692,9 +1695,9 @@ public SyncPoller, Void> beginClaimAnyVm(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginClaimAnyVm(String resourceGroupName, String name, Context context) { return beginClaimAnyVmAsync(resourceGroupName, name, context).getSyncPoller(); } @@ -1707,7 +1710,7 @@ public SyncPoller, Void> beginClaimAnyVm(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono claimAnyVmAsync(String resourceGroupName, String name) { @@ -1723,7 +1726,7 @@ private Mono claimAnyVmAsync(String resourceGroupName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono claimAnyVmAsync(String resourceGroupName, String name, Context context) { @@ -1770,7 +1773,7 @@ public void claimAnyVm(String resourceGroupName, String name, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createEnvironmentWithResponseAsync( @@ -1829,7 +1832,7 @@ private Mono>> createEnvironmentWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createEnvironmentWithResponseAsync( @@ -1887,16 +1890,17 @@ private Mono>> createEnvironmentWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginCreateEnvironmentAsync( String resourceGroupName, String name, LabVirtualMachineCreationParameter labVirtualMachineCreationParameter) { Mono>> mono = createEnvironmentWithResponseAsync(resourceGroupName, name, labVirtualMachineCreationParameter); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1909,9 +1913,9 @@ private PollerFlux, Void> beginCreateEnvironmentAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginCreateEnvironmentAsync( String resourceGroupName, String name, @@ -1934,9 +1938,9 @@ private PollerFlux, Void> beginCreateEnvironmentAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginCreateEnvironment( String resourceGroupName, String name, LabVirtualMachineCreationParameter labVirtualMachineCreationParameter) { return beginCreateEnvironmentAsync(resourceGroupName, name, labVirtualMachineCreationParameter).getSyncPoller(); @@ -1952,9 +1956,9 @@ public SyncPoller, Void> beginCreateEnvironment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginCreateEnvironment( String resourceGroupName, String name, @@ -1973,7 +1977,7 @@ public SyncPoller, Void> beginCreateEnvironment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createEnvironmentAsync( @@ -1993,7 +1997,7 @@ private Mono createEnvironmentAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createEnvironmentAsync( @@ -2051,7 +2055,7 @@ public void createEnvironment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> exportResourceUsageWithResponseAsync( @@ -2110,7 +2114,7 @@ private Mono>> exportResourceUsageWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> exportResourceUsageWithResponseAsync( @@ -2168,16 +2172,17 @@ private Mono>> exportResourceUsageWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginExportResourceUsageAsync( String resourceGroupName, String name, ExportResourceUsageParameters exportResourceUsageParameters) { Mono>> mono = exportResourceUsageWithResponseAsync(resourceGroupName, name, exportResourceUsageParameters); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2190,9 +2195,9 @@ private PollerFlux, Void> beginExportResourceUsageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginExportResourceUsageAsync( String resourceGroupName, String name, @@ -2215,9 +2220,9 @@ private PollerFlux, Void> beginExportResourceUsageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginExportResourceUsage( String resourceGroupName, String name, ExportResourceUsageParameters exportResourceUsageParameters) { return beginExportResourceUsageAsync(resourceGroupName, name, exportResourceUsageParameters).getSyncPoller(); @@ -2233,9 +2238,9 @@ public SyncPoller, Void> beginExportResourceUsage( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginExportResourceUsage( String resourceGroupName, String name, @@ -2254,7 +2259,7 @@ public SyncPoller, Void> beginExportResourceUsage( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono exportResourceUsageAsync( @@ -2274,7 +2279,7 @@ private Mono exportResourceUsageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono exportResourceUsageAsync( @@ -2332,7 +2337,8 @@ public void exportResourceUsage( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response body for generating an upload URI. + * @return response body for generating an upload URI along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> generateUploadUriWithResponseAsync( @@ -2391,7 +2397,8 @@ private Mono> generateUploadUriWithResp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response body for generating an upload URI. + * @return response body for generating an upload URI along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> generateUploadUriWithResponseAsync( @@ -2446,7 +2453,7 @@ private Mono> generateUploadUriWithResp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response body for generating an upload URI. + * @return response body for generating an upload URI on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono generateUploadUriAsync( @@ -2489,7 +2496,7 @@ public GenerateUploadUriResponseInner generateUploadUri( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response body for generating an upload URI. + * @return response body for generating an upload URI along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response generateUploadUriWithResponse( @@ -2507,7 +2514,7 @@ public Response generateUploadUriWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> importVirtualMachineWithResponseAsync( @@ -2567,7 +2574,7 @@ private Mono>> importVirtualMachineWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> importVirtualMachineWithResponseAsync( @@ -2626,16 +2633,17 @@ private Mono>> importVirtualMachineWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginImportVirtualMachineAsync( String resourceGroupName, String name, ImportLabVirtualMachineRequest importLabVirtualMachineRequest) { Mono>> mono = importVirtualMachineWithResponseAsync(resourceGroupName, name, importLabVirtualMachineRequest); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2649,9 +2657,9 @@ private PollerFlux, Void> beginImportVirtualMachineAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginImportVirtualMachineAsync( String resourceGroupName, String name, @@ -2675,9 +2683,9 @@ private PollerFlux, Void> beginImportVirtualMachineAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginImportVirtualMachine( String resourceGroupName, String name, ImportLabVirtualMachineRequest importLabVirtualMachineRequest) { return beginImportVirtualMachineAsync(resourceGroupName, name, importLabVirtualMachineRequest).getSyncPoller(); @@ -2694,9 +2702,9 @@ public SyncPoller, Void> beginImportVirtualMachine( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginImportVirtualMachine( String resourceGroupName, String name, @@ -2716,7 +2724,7 @@ public SyncPoller, Void> beginImportVirtualMachine( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono importVirtualMachineAsync( @@ -2737,7 +2745,7 @@ private Mono importVirtualMachineAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono importVirtualMachineAsync( @@ -2796,7 +2804,8 @@ public void importVirtualMachine( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVhdsSinglePageAsync(String resourceGroupName, String name) { @@ -2853,7 +2862,8 @@ private Mono> listVhdsSinglePageAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVhdsSinglePageAsync( @@ -2907,7 +2917,7 @@ private Mono> listVhdsSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVhdsAsync(String resourceGroupName, String name) { @@ -2924,7 +2934,7 @@ private PagedFlux listVhdsAsync(String resourceGroupName, String na * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVhdsAsync(String resourceGroupName, String name, Context context) { @@ -2941,7 +2951,7 @@ private PagedFlux listVhdsAsync(String resourceGroupName, String na * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listVhds(String resourceGroupName, String name) { @@ -2957,7 +2967,7 @@ public PagedIterable listVhds(String resourceGroupName, String name * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listVhds(String resourceGroupName, String name, Context context) { @@ -2971,7 +2981,8 @@ public PagedIterable listVhds(String resourceGroupName, String name * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -3008,7 +3019,8 @@ private Mono> listBySubscriptionNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { @@ -3043,7 +3055,8 @@ private Mono> listBySubscriptionNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -3080,7 +3093,8 @@ private Mono> listByResourceGroupNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { @@ -3115,7 +3129,8 @@ private Mono> listByResourceGroupNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVhdsNextSinglePageAsync(String nextLink) { @@ -3151,7 +3166,8 @@ private Mono> listVhdsNextSinglePageAsync(String next * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVhdsNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/LabsImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/LabsImpl.java index 4ab00b44e03b..061e41e5a732 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/LabsImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/LabsImpl.java @@ -21,10 +21,9 @@ import com.azure.resourcemanager.devtestlabs.models.LabVhd; import com.azure.resourcemanager.devtestlabs.models.LabVirtualMachineCreationParameter; import com.azure.resourcemanager.devtestlabs.models.Labs; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class LabsImpl implements Labs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(LabsImpl.class); private final LabsClient innerClient; @@ -177,7 +176,7 @@ public PagedIterable listVhds(String resourceGroupName, String name, Con public Lab getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -185,7 +184,7 @@ public Lab getById(String id) { } String name = Utils.getValueFromIdByName(id, "labs"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); @@ -197,7 +196,7 @@ public Lab getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -205,7 +204,7 @@ public Response getByIdWithResponse(String id, String expand, Context conte } String name = Utils.getValueFromIdByName(id, "labs"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); @@ -216,7 +215,7 @@ public Response getByIdWithResponse(String id, String expand, Context conte public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -224,7 +223,7 @@ public void deleteById(String id) { } String name = Utils.getValueFromIdByName(id, "labs"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); @@ -235,7 +234,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -243,7 +242,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String name = Utils.getValueFromIdByName(id, "labs"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/NotificationChannelsClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/NotificationChannelsClientImpl.java index a87fbf7dbe25..1880bb01755a 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/NotificationChannelsClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/NotificationChannelsClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.NotificationChannelsClient; import com.azure.resourcemanager.devtestlabs.fluent.models.NotificationChannelInner; import com.azure.resourcemanager.devtestlabs.models.NotificationChannelFragment; @@ -40,8 +39,6 @@ /** An instance of this class provides access to all the operations defined in NotificationChannelsClient. */ public final class NotificationChannelsClientImpl implements NotificationChannelsClient { - private final ClientLogger logger = new ClientLogger(NotificationChannelsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final NotificationChannelsService service; @@ -193,7 +190,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -259,7 +257,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -327,7 +326,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -345,7 +344,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName) { @@ -371,7 +370,7 @@ private PagedFlux listAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -395,7 +394,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName) { @@ -419,7 +418,7 @@ public PagedIterable list(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -443,7 +442,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return notification channel. + * @return notification channel along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -499,7 +498,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return notification channel. + * @return notification channel along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -551,7 +550,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return notification channel. + * @return notification channel on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -576,7 +575,7 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return notification channel. + * @return notification channel on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name) { @@ -620,7 +619,7 @@ public NotificationChannelInner get(String resourceGroupName, String labName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return notification channel. + * @return notification channel along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -638,7 +637,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a notification. + * @return a notification along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -700,7 +699,7 @@ private Mono> createOrUpdateWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a notification. + * @return a notification along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -762,7 +761,7 @@ private Mono> createOrUpdateWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a notification. + * @return a notification on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -807,7 +806,7 @@ public NotificationChannelInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a notification. + * @return a notification along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -828,7 +827,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String labName, String name) { @@ -881,7 +880,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -931,7 +930,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String name) { @@ -963,7 +962,7 @@ public void delete(String resourceGroupName, String labName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context) { @@ -980,7 +979,7 @@ public Response deleteWithResponse(String resourceGroupName, String labNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a notification. + * @return a notification along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1042,7 +1041,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a notification. + * @return a notification along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1104,7 +1103,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a notification. + * @return a notification on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1149,7 +1148,7 @@ public NotificationChannelInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a notification. + * @return a notification along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1171,7 +1170,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> notifyWithResponseAsync( @@ -1233,7 +1232,7 @@ private Mono> notifyWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> notifyWithResponseAsync( @@ -1291,7 +1290,7 @@ private Mono> notifyWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono notifyAsync( @@ -1327,7 +1326,7 @@ public void notify(String resourceGroupName, String labName, String name, Notify * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response notifyWithResponse( @@ -1342,7 +1341,8 @@ public Response notifyWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1378,7 +1378,8 @@ private Mono> listNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/NotificationChannelsImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/NotificationChannelsImpl.java index a9bd1f8dc8e7..d52e417bbe9e 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/NotificationChannelsImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/NotificationChannelsImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.devtestlabs.models.NotificationChannel; import com.azure.resourcemanager.devtestlabs.models.NotificationChannels; import com.azure.resourcemanager.devtestlabs.models.NotifyParameters; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class NotificationChannelsImpl implements NotificationChannels { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NotificationChannelsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(NotificationChannelsImpl.class); private final NotificationChannelsClient innerClient; @@ -92,7 +91,7 @@ public Response notifyWithResponse( public NotificationChannel getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -100,14 +99,14 @@ public NotificationChannel getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "notificationchannels"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -122,7 +121,7 @@ public NotificationChannel getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -130,14 +129,14 @@ public Response getByIdWithResponse(String id, String expan } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "notificationchannels"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -151,7 +150,7 @@ public Response getByIdWithResponse(String id, String expan public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -159,14 +158,14 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "notificationchannels"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -174,13 +173,13 @@ public void deleteById(String id) { "The resource ID '%s' is not valid. Missing path segment 'notificationchannels'.", id))); } - this.deleteWithResponse(resourceGroupName, labName, name, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, labName, name, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -188,14 +187,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "notificationchannels"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/OperationsClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/OperationsClientImpl.java index e7f0a8158bd4..912b5553e2fc 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/OperationsClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/OperationsClientImpl.java @@ -21,15 +21,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.OperationsClient; import com.azure.resourcemanager.devtestlabs.fluent.models.OperationResultInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -77,7 +74,7 @@ Mono> get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation. + * @return operation along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String locationName, String name) { @@ -124,7 +121,7 @@ private Mono> getWithResponseAsync(String locatio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation. + * @return operation along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -168,7 +165,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation. + * @return operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String locationName, String name) { @@ -207,7 +204,7 @@ public OperationResultInner get(String locationName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation. + * @return operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String locationName, String name, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/OperationsImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/OperationsImpl.java index 6722c758515f..d082a47a7e1a 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/OperationsImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/OperationsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.OperationResultInner; import com.azure.resourcemanager.devtestlabs.models.OperationResult; import com.azure.resourcemanager.devtestlabs.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PoliciesClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PoliciesClientImpl.java index e67c849af13f..9f2649c23e2c 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PoliciesClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PoliciesClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.PoliciesClient; import com.azure.resourcemanager.devtestlabs.fluent.models.PolicyInner; import com.azure.resourcemanager.devtestlabs.models.PolicyFragment; @@ -38,8 +37,6 @@ /** An instance of this class provides access to all the operations defined in PoliciesClient. */ public final class PoliciesClientImpl implements PoliciesClient { - private final ClientLogger logger = new ClientLogger(PoliciesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PoliciesService service; @@ -178,7 +175,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -255,7 +253,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -329,7 +328,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -354,7 +353,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName, String policySetName) { @@ -381,7 +380,7 @@ private PagedFlux listAsync(String resourceGroupName, String labNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -407,7 +406,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName, String policySetName) { @@ -432,7 +431,7 @@ public PagedIterable list(String resourceGroupName, String labName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -459,7 +458,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy. + * @return policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -520,7 +519,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy. + * @return policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -577,7 +576,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy. + * @return policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -603,7 +602,7 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy. + * @return policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String policySetName, String name) { @@ -649,7 +648,7 @@ public PolicyInner get(String resourceGroupName, String labName, String policySe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy. + * @return policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -668,7 +667,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Policy. + * @return a Policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -734,7 +733,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Policy. + * @return a Policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -801,7 +800,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Policy. + * @return a Policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -848,7 +847,7 @@ public PolicyInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Policy. + * @return a Policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -872,7 +871,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -931,7 +930,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -986,7 +985,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String policySetName, String name) { @@ -1021,7 +1020,7 @@ public void delete(String resourceGroupName, String labName, String policySetNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -1040,7 +1039,7 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Policy. + * @return a Policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1106,7 +1105,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Policy. + * @return a Policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1173,7 +1172,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Policy. + * @return a Policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1220,7 +1219,7 @@ public PolicyInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Policy. + * @return a Policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1240,7 +1239,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1276,7 +1276,8 @@ private Mono> listNextSinglePageAsync(String nextLink * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PoliciesImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PoliciesImpl.java index d0c7d95fa529..2b06ec474e9d 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PoliciesImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PoliciesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.PolicyInner; import com.azure.resourcemanager.devtestlabs.models.Policies; import com.azure.resourcemanager.devtestlabs.models.Policy; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PoliciesImpl implements Policies { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PoliciesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PoliciesImpl.class); private final PoliciesClient innerClient; @@ -83,7 +82,7 @@ public Response deleteWithResponse( public Policy getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -91,21 +90,21 @@ public Policy getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String policySetName = Utils.getValueFromIdByName(id, "policysets"); if (policySetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'policysets'.", id))); } String name = Utils.getValueFromIdByName(id, "policies"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'policies'.", id))); @@ -119,7 +118,7 @@ public Policy getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -127,21 +126,21 @@ public Response getByIdWithResponse(String id, String expand, Context co } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String policySetName = Utils.getValueFromIdByName(id, "policysets"); if (policySetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'policysets'.", id))); } String name = Utils.getValueFromIdByName(id, "policies"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'policies'.", id))); @@ -152,7 +151,7 @@ public Response getByIdWithResponse(String id, String expand, Context co public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -160,32 +159,32 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String policySetName = Utils.getValueFromIdByName(id, "policysets"); if (policySetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'policysets'.", id))); } String name = Utils.getValueFromIdByName(id, "policies"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'policies'.", id))); } - this.deleteWithResponse(resourceGroupName, labName, policySetName, name, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, labName, policySetName, name, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -193,21 +192,21 @@ public Response deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String policySetName = Utils.getValueFromIdByName(id, "policysets"); if (policySetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'policysets'.", id))); } String name = Utils.getValueFromIdByName(id, "policies"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'policies'.", id))); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PolicySetsClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PolicySetsClientImpl.java index 958f5b6d7f04..05cb476ce55b 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PolicySetsClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PolicySetsClientImpl.java @@ -22,7 +22,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.PolicySetsClient; import com.azure.resourcemanager.devtestlabs.fluent.models.EvaluatePoliciesResponseInner; import com.azure.resourcemanager.devtestlabs.models.EvaluatePoliciesRequest; @@ -30,8 +29,6 @@ /** An instance of this class provides access to all the operations defined in PolicySetsClient. */ public final class PolicySetsClientImpl implements PolicySetsClient { - private final ClientLogger logger = new ClientLogger(PolicySetsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PolicySetsService service; @@ -84,7 +81,8 @@ Mono> evaluatePolicies( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response body for evaluating a policy set. + * @return response body for evaluating a policy set along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> evaluatePoliciesWithResponseAsync( @@ -147,7 +145,8 @@ private Mono> evaluatePoliciesWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response body for evaluating a policy set. + * @return response body for evaluating a policy set along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> evaluatePoliciesWithResponseAsync( @@ -210,7 +209,7 @@ private Mono> evaluatePoliciesWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response body for evaluating a policy set. + * @return response body for evaluating a policy set on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono evaluatePoliciesAsync( @@ -255,7 +254,7 @@ public EvaluatePoliciesResponseInner evaluatePolicies( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response body for evaluating a policy set. + * @return response body for evaluating a policy set along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response evaluatePoliciesWithResponse( diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PolicySetsImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PolicySetsImpl.java index 79fe57a17cee..746b578933fa 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PolicySetsImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/PolicySetsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.devtestlabs.models.EvaluatePoliciesRequest; import com.azure.resourcemanager.devtestlabs.models.EvaluatePoliciesResponse; import com.azure.resourcemanager.devtestlabs.models.PolicySets; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PolicySetsImpl implements PolicySets { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicySetsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PolicySetsImpl.class); private final PolicySetsClient innerClient; diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ProviderOperationsClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ProviderOperationsClientImpl.java index 109514e30e74..6f467c076256 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ProviderOperationsClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ProviderOperationsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.ProviderOperationsClient; import com.azure.resourcemanager.devtestlabs.fluent.models.OperationMetadataInner; import com.azure.resourcemanager.devtestlabs.models.ProviderOperationResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in ProviderOperationsClient. */ public final class ProviderOperationsClientImpl implements ProviderOperationsClient { - private final ClientLogger logger = new ClientLogger(ProviderOperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ProviderOperationsService service; @@ -85,7 +82,8 @@ Mono> listNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -118,7 +116,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -148,7 +147,7 @@ private Mono> listSinglePageAsync(Context * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -162,7 +161,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -175,7 +174,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -189,7 +188,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -203,7 +202,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -239,7 +239,8 @@ private Mono> listNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ProviderOperationsImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ProviderOperationsImpl.java index 12d7cc5ae857..45dd40dd3cac 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ProviderOperationsImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ProviderOperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.OperationMetadataInner; import com.azure.resourcemanager.devtestlabs.models.OperationMetadata; import com.azure.resourcemanager.devtestlabs.models.ProviderOperations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ProviderOperationsImpl implements ProviderOperations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProviderOperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ProviderOperationsImpl.class); private final ProviderOperationsClient innerClient; diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SchedulesClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SchedulesClientImpl.java index a06ac0f58a08..0291b4660328 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SchedulesClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SchedulesClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.SchedulesClient; @@ -44,8 +43,6 @@ /** An instance of this class provides access to all the operations defined in SchedulesClient. */ public final class SchedulesClientImpl implements SchedulesClient { - private final ClientLogger logger = new ClientLogger(SchedulesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SchedulesService service; @@ -221,7 +218,8 @@ Mono> listApplicableNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -287,7 +285,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -355,7 +354,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -373,7 +372,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName) { @@ -399,7 +398,7 @@ private PagedFlux listAsync(String resourceGroupName, String labN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -423,7 +422,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName) { @@ -447,7 +446,7 @@ public PagedIterable list(String resourceGroupName, String labNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -471,7 +470,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -527,7 +526,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -579,7 +578,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name, String expand) { @@ -603,7 +602,7 @@ private Mono getAsync(String resourceGroupName, String labName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name) { @@ -647,7 +646,7 @@ public ScheduleInner get(String resourceGroupName, String labName, String name) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -665,7 +664,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -726,7 +725,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -783,7 +782,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -827,7 +826,7 @@ public ScheduleInner createOrUpdate(String resourceGroupName, String labName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -844,7 +843,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String labName, String name) { @@ -897,7 +896,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -947,7 +946,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String name) { @@ -979,7 +978,7 @@ public void delete(String resourceGroupName, String labName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context) { @@ -996,7 +995,7 @@ public Response deleteWithResponse(String resourceGroupName, String labNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1057,7 +1056,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1114,7 +1113,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1158,7 +1157,7 @@ public ScheduleInner update(String resourceGroupName, String labName, String nam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1175,7 +1174,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> executeWithResponseAsync( @@ -1229,7 +1228,7 @@ private Mono>> executeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> executeWithResponseAsync( @@ -1279,15 +1278,16 @@ private Mono>> executeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginExecuteAsync( String resourceGroupName, String labName, String name) { Mono>> mono = executeWithResponseAsync(resourceGroupName, labName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1300,9 +1300,9 @@ private PollerFlux, Void> beginExecuteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginExecuteAsync( String resourceGroupName, String labName, String name, Context context) { context = this.client.mergeContext(context); @@ -1321,9 +1321,9 @@ private PollerFlux, Void> beginExecuteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginExecute(String resourceGroupName, String labName, String name) { return beginExecuteAsync(resourceGroupName, labName, name).getSyncPoller(); } @@ -1338,9 +1338,9 @@ public SyncPoller, Void> beginExecute(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginExecute( String resourceGroupName, String labName, String name, Context context) { return beginExecuteAsync(resourceGroupName, labName, name, context).getSyncPoller(); @@ -1355,7 +1355,7 @@ public SyncPoller, Void> beginExecute( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono executeAsync(String resourceGroupName, String labName, String name) { @@ -1374,7 +1374,7 @@ private Mono executeAsync(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono executeAsync(String resourceGroupName, String labName, String name, Context context) { @@ -1423,7 +1423,8 @@ public void execute(String resourceGroupName, String labName, String name, Conte * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listApplicableSinglePageAsync( @@ -1486,7 +1487,8 @@ private Mono> listApplicableSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listApplicableSinglePageAsync( @@ -1545,7 +1547,7 @@ private Mono> listApplicableSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listApplicableAsync(String resourceGroupName, String labName, String name) { @@ -1564,7 +1566,7 @@ private PagedFlux listApplicableAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listApplicableAsync( @@ -1583,7 +1585,7 @@ private PagedFlux listApplicableAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listApplicable(String resourceGroupName, String labName, String name) { @@ -1600,7 +1602,7 @@ public PagedIterable listApplicable(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listApplicable( @@ -1615,7 +1617,8 @@ public PagedIterable listApplicable( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1651,7 +1654,8 @@ private Mono> listNextSinglePageAsync(String nextLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1686,7 +1690,8 @@ private Mono> listNextSinglePageAsync(String nextLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listApplicableNextSinglePageAsync(String nextLink) { @@ -1722,7 +1727,8 @@ private Mono> listApplicableNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listApplicableNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SchedulesImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SchedulesImpl.java index b25644ac0d5f..0fc61f7bdfd5 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SchedulesImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SchedulesImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.devtestlabs.models.Schedule; import com.azure.resourcemanager.devtestlabs.models.ScheduleFragment; import com.azure.resourcemanager.devtestlabs.models.Schedules; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SchedulesImpl implements Schedules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SchedulesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SchedulesImpl.class); private final SchedulesClient innerClient; diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SecretsClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SecretsClientImpl.java index 0627f5e5dfdb..c9b4ccd9ee87 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SecretsClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SecretsClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.SecretsClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in SecretsClient. */ public final class SecretsClientImpl implements SecretsClient { - private final ClientLogger logger = new ClientLogger(SecretsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SecretsService service; @@ -183,7 +180,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -260,7 +258,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -334,7 +333,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -359,7 +358,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName, String username) { @@ -386,7 +385,7 @@ private PagedFlux listAsync(String resourceGroupName, String labNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -412,7 +411,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName, String username) { @@ -437,7 +436,7 @@ public PagedIterable list(String resourceGroupName, String labName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -464,7 +463,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secret. + * @return secret along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -525,7 +524,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secret. + * @return secret along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -582,7 +581,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secret. + * @return secret on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -608,7 +607,7 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secret. + * @return secret on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String username, String name) { @@ -654,7 +653,7 @@ public SecretInner get(String resourceGroupName, String labName, String username * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secret. + * @return secret along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -673,7 +672,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return a secret along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -739,7 +738,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return a secret along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -801,9 +800,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return the {@link PollerFlux} for polling of a secret. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SecretInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String username, String name, SecretInner secret) { Mono>> mono = @@ -811,7 +810,7 @@ private PollerFlux, SecretInner> beginCreateOrUpdateAsyn return this .client .getLroResult( - mono, this.client.getHttpPipeline(), SecretInner.class, SecretInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), SecretInner.class, SecretInner.class, this.client.getContext()); } /** @@ -826,9 +825,9 @@ private PollerFlux, SecretInner> beginCreateOrUpdateAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return the {@link PollerFlux} for polling of a secret. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SecretInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String username, String name, SecretInner secret, Context context) { context = this.client.mergeContext(context); @@ -851,9 +850,9 @@ private PollerFlux, SecretInner> beginCreateOrUpdateAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return the {@link SyncPoller} for polling of a secret. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SecretInner> beginCreateOrUpdate( String resourceGroupName, String labName, String username, String name, SecretInner secret) { return beginCreateOrUpdateAsync(resourceGroupName, labName, username, name, secret).getSyncPoller(); @@ -871,9 +870,9 @@ public SyncPoller, SecretInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return the {@link SyncPoller} for polling of a secret. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SecretInner> beginCreateOrUpdate( String resourceGroupName, String labName, String username, String name, SecretInner secret, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, labName, username, name, secret, context).getSyncPoller(); @@ -890,7 +889,7 @@ public SyncPoller, SecretInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return a secret on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -912,7 +911,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return a secret on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -971,7 +970,7 @@ public SecretInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -1030,7 +1029,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -1085,7 +1084,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String username, String name) { @@ -1120,7 +1119,7 @@ public void delete(String resourceGroupName, String labName, String username, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -1139,7 +1138,7 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return a secret along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1205,7 +1204,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return a secret along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1272,7 +1271,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return a secret on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1319,7 +1318,7 @@ public SecretInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a secret. + * @return a secret along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1339,7 +1338,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1375,7 +1375,8 @@ private Mono> listNextSinglePageAsync(String nextLink * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SecretsImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SecretsImpl.java index 21f9a5350bc2..f3583e13104a 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SecretsImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/SecretsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.SecretInner; import com.azure.resourcemanager.devtestlabs.models.Secret; import com.azure.resourcemanager.devtestlabs.models.Secrets; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SecretsImpl implements Secrets { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecretsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SecretsImpl.class); private final SecretsClient innerClient; @@ -83,7 +82,7 @@ public Response deleteWithResponse( public Secret getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -91,21 +90,21 @@ public Secret getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "secrets"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'secrets'.", id))); @@ -117,7 +116,7 @@ public Secret getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -125,21 +124,21 @@ public Response getByIdWithResponse(String id, String expand, Context co } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "secrets"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'secrets'.", id))); @@ -150,7 +149,7 @@ public Response getByIdWithResponse(String id, String expand, Context co public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -158,32 +157,32 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "secrets"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'secrets'.", id))); } - this.deleteWithResponse(resourceGroupName, labName, username, name, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, labName, username, name, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -191,21 +190,21 @@ public Response deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "secrets"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'secrets'.", id))); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricPropertiesImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricPropertiesImpl.java new file mode 100644 index 000000000000..ac4418dbe76a --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricPropertiesImpl.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.implementation; + +import com.azure.resourcemanager.devtestlabs.fluent.models.ApplicableScheduleInner; +import com.azure.resourcemanager.devtestlabs.fluent.models.ServiceFabricPropertiesInner; +import com.azure.resourcemanager.devtestlabs.models.ApplicableSchedule; +import com.azure.resourcemanager.devtestlabs.models.ServiceFabricProperties; + +public final class ServiceFabricPropertiesImpl implements ServiceFabricProperties { + private ServiceFabricPropertiesInner innerObject; + + private final com.azure.resourcemanager.devtestlabs.DevTestLabsManager serviceManager; + + ServiceFabricPropertiesImpl( + ServiceFabricPropertiesInner innerObject, + com.azure.resourcemanager.devtestlabs.DevTestLabsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String externalServiceFabricId() { + return this.innerModel().externalServiceFabricId(); + } + + public String environmentId() { + return this.innerModel().environmentId(); + } + + public ApplicableSchedule applicableSchedule() { + ApplicableScheduleInner inner = this.innerModel().applicableSchedule(); + if (inner != null) { + return new ApplicableScheduleImpl(inner, this.manager()); + } else { + return null; + } + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public String uniqueIdentifier() { + return this.innerModel().uniqueIdentifier(); + } + + public ServiceFabricPropertiesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricSchedulesClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricSchedulesClientImpl.java index b7d38893ec42..5288831e10c5 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricSchedulesClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricSchedulesClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.ServiceFabricSchedulesClient; @@ -44,8 +43,6 @@ /** An instance of this class provides access to all the operations defined in ServiceFabricSchedulesClient. */ public final class ServiceFabricSchedulesClientImpl implements ServiceFabricSchedulesClient { - private final ClientLogger logger = new ClientLogger(ServiceFabricSchedulesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ServiceFabricSchedulesService service; @@ -210,7 +207,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -294,7 +292,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -375,7 +374,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -404,7 +403,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -435,7 +434,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -465,7 +464,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -493,7 +492,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -522,7 +521,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -594,7 +593,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -663,7 +662,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -695,7 +694,7 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -745,7 +744,7 @@ public ScheduleInner get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -772,7 +771,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -849,7 +848,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -923,7 +922,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -982,7 +981,7 @@ public ScheduleInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -1009,7 +1008,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -1074,7 +1073,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -1140,7 +1139,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1179,7 +1178,7 @@ public void delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -1204,7 +1203,7 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1281,7 +1280,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1355,7 +1354,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1414,7 +1413,7 @@ public ScheduleInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1440,7 +1439,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> executeWithResponseAsync( @@ -1505,7 +1504,7 @@ private Mono>> executeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> executeWithResponseAsync( @@ -1571,16 +1570,17 @@ private Mono>> executeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginExecuteAsync( String resourceGroupName, String labName, String username, String serviceFabricName, String name) { Mono>> mono = executeWithResponseAsync(resourceGroupName, labName, username, serviceFabricName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1595,9 +1595,9 @@ private PollerFlux, Void> beginExecuteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginExecuteAsync( String resourceGroupName, String labName, @@ -1624,9 +1624,9 @@ private PollerFlux, Void> beginExecuteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginExecute( String resourceGroupName, String labName, String username, String serviceFabricName, String name) { return beginExecuteAsync(resourceGroupName, labName, username, serviceFabricName, name).getSyncPoller(); @@ -1644,9 +1644,9 @@ public SyncPoller, Void> beginExecute( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginExecute( String resourceGroupName, String labName, @@ -1669,7 +1669,7 @@ public SyncPoller, Void> beginExecute( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono executeAsync( @@ -1691,7 +1691,7 @@ private Mono executeAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono executeAsync( @@ -1755,7 +1755,8 @@ public void execute( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1791,7 +1792,8 @@ private Mono> listNextSinglePageAsync(String nextLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricSchedulesImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricSchedulesImpl.java index 4dbc34089f87..4433274945be 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricSchedulesImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricSchedulesImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.devtestlabs.models.Schedule; import com.azure.resourcemanager.devtestlabs.models.ScheduleFragment; import com.azure.resourcemanager.devtestlabs.models.ServiceFabricSchedules; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ServiceFabricSchedulesImpl implements ServiceFabricSchedules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceFabricSchedulesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ServiceFabricSchedulesImpl.class); private final ServiceFabricSchedulesClient innerClient; diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricsClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricsClientImpl.java index 43f01fd55391..74ad328d4193 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricsClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricsClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.ServiceFabricsClient; @@ -45,8 +44,6 @@ /** An instance of this class provides access to all the operations defined in ServiceFabricsClient. */ public final class ServiceFabricsClientImpl implements ServiceFabricsClient { - private final ClientLogger logger = new ClientLogger(ServiceFabricsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ServiceFabricsService service; @@ -237,7 +234,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -314,7 +312,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -388,7 +387,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -413,7 +412,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName, String username) { @@ -440,7 +439,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -466,7 +465,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName, String username) { @@ -491,7 +490,7 @@ public PagedIterable list(String resourceGroupName, String l * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -518,7 +517,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service fabric. + * @return service fabric along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -579,7 +578,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service fabric. + * @return service fabric along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -636,7 +635,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service fabric. + * @return service fabric on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -662,7 +661,7 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service fabric. + * @return service fabric on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String username, String name) { @@ -708,7 +707,7 @@ public ServiceFabricInner get(String resourceGroupName, String labName, String u * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service fabric. + * @return service fabric along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -727,7 +726,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return a Service Fabric along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -793,7 +792,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return a Service Fabric along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -860,9 +859,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return the {@link PollerFlux} for polling of a Service Fabric. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServiceFabricInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String username, String name, ServiceFabricInner serviceFabric) { Mono>> mono = @@ -870,7 +869,11 @@ private PollerFlux, ServiceFabricInner> beginCrea return this .client .getLroResult( - mono, this.client.getHttpPipeline(), ServiceFabricInner.class, ServiceFabricInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + ServiceFabricInner.class, + ServiceFabricInner.class, + this.client.getContext()); } /** @@ -885,9 +888,9 @@ private PollerFlux, ServiceFabricInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return the {@link PollerFlux} for polling of a Service Fabric. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServiceFabricInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, @@ -915,9 +918,9 @@ private PollerFlux, ServiceFabricInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return the {@link SyncPoller} for polling of a Service Fabric. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServiceFabricInner> beginCreateOrUpdate( String resourceGroupName, String labName, String username, String name, ServiceFabricInner serviceFabric) { return beginCreateOrUpdateAsync(resourceGroupName, labName, username, name, serviceFabric).getSyncPoller(); @@ -935,9 +938,9 @@ public SyncPoller, ServiceFabricInner> beginCreat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return the {@link SyncPoller} for polling of a Service Fabric. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServiceFabricInner> beginCreateOrUpdate( String resourceGroupName, String labName, @@ -960,7 +963,7 @@ public SyncPoller, ServiceFabricInner> beginCreat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return a Service Fabric on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -982,7 +985,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return a Service Fabric on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -1051,7 +1054,7 @@ public ServiceFabricInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1110,7 +1113,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1165,15 +1168,16 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String labName, String username, String name) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, labName, username, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1187,9 +1191,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String labName, String username, String name, Context context) { context = this.client.mergeContext(context); @@ -1210,9 +1214,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String username, String name) { return beginDeleteAsync(resourceGroupName, labName, username, name).getSyncPoller(); @@ -1229,9 +1233,9 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String username, String name, Context context) { return beginDeleteAsync(resourceGroupName, labName, username, name, context).getSyncPoller(); @@ -1247,7 +1251,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String username, String name) { @@ -1267,7 +1271,7 @@ private Mono deleteAsync(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1321,7 +1325,7 @@ public void delete(String resourceGroupName, String labName, String username, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return a Service Fabric along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1387,7 +1391,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return a Service Fabric along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1454,7 +1458,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return a Service Fabric on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1501,7 +1505,7 @@ public ServiceFabricInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service Fabric. + * @return a Service Fabric along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1524,7 +1528,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listApplicableSchedulesWithResponseAsync( @@ -1583,7 +1588,8 @@ private Mono> listApplicableSchedulesWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listApplicableSchedulesWithResponseAsync( @@ -1638,7 +1644,7 @@ private Mono> listApplicableSchedulesWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listApplicableSchedulesAsync( @@ -1683,7 +1689,7 @@ public ApplicableScheduleInner listApplicableSchedules( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listApplicableSchedulesWithResponse( @@ -1701,7 +1707,7 @@ public Response listApplicableSchedulesWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( @@ -1760,7 +1766,7 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( @@ -1815,15 +1821,16 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( String resourceGroupName, String labName, String username, String name) { Mono>> mono = startWithResponseAsync(resourceGroupName, labName, username, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1837,9 +1844,9 @@ private PollerFlux, Void> beginStartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( String resourceGroupName, String labName, String username, String name, Context context) { context = this.client.mergeContext(context); @@ -1860,9 +1867,9 @@ private PollerFlux, Void> beginStartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart( String resourceGroupName, String labName, String username, String name) { return beginStartAsync(resourceGroupName, labName, username, name).getSyncPoller(); @@ -1879,9 +1886,9 @@ public SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart( String resourceGroupName, String labName, String username, String name, Context context) { return beginStartAsync(resourceGroupName, labName, username, name, context).getSyncPoller(); @@ -1897,7 +1904,7 @@ public SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String labName, String username, String name) { @@ -1917,7 +1924,7 @@ private Mono startAsync(String resourceGroupName, String labName, String u * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync( @@ -1970,7 +1977,7 @@ public void start(String resourceGroupName, String labName, String username, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( @@ -2029,7 +2036,7 @@ private Mono>> stopWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( @@ -2084,15 +2091,16 @@ private Mono>> stopWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( String resourceGroupName, String labName, String username, String name) { Mono>> mono = stopWithResponseAsync(resourceGroupName, labName, username, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2106,9 +2114,9 @@ private PollerFlux, Void> beginStopAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( String resourceGroupName, String labName, String username, String name, Context context) { context = this.client.mergeContext(context); @@ -2129,9 +2137,9 @@ private PollerFlux, Void> beginStopAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( String resourceGroupName, String labName, String username, String name) { return beginStopAsync(resourceGroupName, labName, username, name).getSyncPoller(); @@ -2148,9 +2156,9 @@ public SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( String resourceGroupName, String labName, String username, String name, Context context) { return beginStopAsync(resourceGroupName, labName, username, name, context).getSyncPoller(); @@ -2166,7 +2174,7 @@ public SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String labName, String username, String name) { @@ -2186,7 +2194,7 @@ private Mono stopAsync(String resourceGroupName, String labName, String us * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync( @@ -2236,7 +2244,8 @@ public void stop(String resourceGroupName, String labName, String username, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2272,7 +2281,8 @@ private Mono> listNextSinglePageAsync(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricsImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricsImpl.java index 5cf4d5d15dc9..0ac99a8bc8d4 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricsImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceFabricsImpl.java @@ -15,10 +15,9 @@ import com.azure.resourcemanager.devtestlabs.models.ApplicableSchedule; import com.azure.resourcemanager.devtestlabs.models.ServiceFabric; import com.azure.resourcemanager.devtestlabs.models.ServiceFabrics; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ServiceFabricsImpl implements ServiceFabrics { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceFabricsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ServiceFabricsImpl.class); private final ServiceFabricsClient innerClient; @@ -128,7 +127,7 @@ public void stop(String resourceGroupName, String labName, String username, Stri public ServiceFabric getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -136,21 +135,21 @@ public ServiceFabric getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "servicefabrics"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -163,7 +162,7 @@ public ServiceFabric getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -171,21 +170,21 @@ public Response getByIdWithResponse(String id, String expand, Con } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "servicefabrics"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -197,7 +196,7 @@ public Response getByIdWithResponse(String id, String expand, Con public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -205,21 +204,21 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "servicefabrics"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -231,7 +230,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -239,21 +238,21 @@ public void deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); } String name = Utils.getValueFromIdByName(id, "servicefabrics"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceRunnersClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceRunnersClientImpl.java index 45d23bcaffae..5b5c64f882ad 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceRunnersClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceRunnersClientImpl.java @@ -24,15 +24,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.ServiceRunnersClient; import com.azure.resourcemanager.devtestlabs.fluent.models.ServiceRunnerInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ServiceRunnersClient. */ public final class ServiceRunnersClientImpl implements ServiceRunnersClient { - private final ClientLogger logger = new ClientLogger(ServiceRunnersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ServiceRunnersService service; @@ -116,7 +113,7 @@ Mono> delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service runner. + * @return service runner along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -170,7 +167,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service runner. + * @return service runner along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -220,7 +217,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service runner. + * @return service runner on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name) { @@ -261,7 +258,7 @@ public ServiceRunnerInner get(String resourceGroupName, String labName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service runner. + * @return service runner along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -279,7 +276,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container for a managed identity to execute DevTest lab services. + * @return a container for a managed identity to execute DevTest lab services along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -340,7 +338,8 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container for a managed identity to execute DevTest lab services. + * @return a container for a managed identity to execute DevTest lab services along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -397,7 +396,8 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container for a managed identity to execute DevTest lab services. + * @return a container for a managed identity to execute DevTest lab services on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -442,7 +442,7 @@ public ServiceRunnerInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container for a managed identity to execute DevTest lab services. + * @return a container for a managed identity to execute DevTest lab services along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -459,7 +459,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String labName, String name) { @@ -512,7 +512,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -562,7 +562,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String name) { @@ -594,7 +594,7 @@ public void delete(String resourceGroupName, String labName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceRunnersImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceRunnersImpl.java index f3e1ec6938dd..9df732bc51ad 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceRunnersImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/ServiceRunnersImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.ServiceRunnerInner; import com.azure.resourcemanager.devtestlabs.models.ServiceRunner; import com.azure.resourcemanager.devtestlabs.models.ServiceRunners; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ServiceRunnersImpl implements ServiceRunners { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceRunnersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ServiceRunnersImpl.class); private final ServiceRunnersClient innerClient; @@ -62,7 +61,7 @@ public Response deleteWithResponse(String resourceGroupName, String labNam public ServiceRunner getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -70,14 +69,14 @@ public ServiceRunner getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "servicerunners"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -89,7 +88,7 @@ public ServiceRunner getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -97,14 +96,14 @@ public Response getByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "servicerunners"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -116,7 +115,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -124,26 +123,26 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "servicerunners"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'servicerunners'.", id))); } - this.deleteWithResponse(resourceGroupName, labName, name, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, labName, name, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -151,14 +150,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "servicerunners"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/UsersClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/UsersClientImpl.java index c02c18145d71..41de54364b41 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/UsersClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/UsersClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.UsersClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in UsersClient. */ public final class UsersClientImpl implements UsersClient { - private final ClientLogger logger = new ClientLogger(UsersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final UsersService service; @@ -177,7 +174,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -243,7 +241,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -311,7 +310,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -329,7 +328,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName) { @@ -355,7 +354,7 @@ private PagedFlux listAsync(String resourceGroupName, String labName) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -379,7 +378,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName) { @@ -403,7 +402,7 @@ public PagedIterable list(String resourceGroupName, String labName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -427,7 +426,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user profile. + * @return user profile along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -483,7 +482,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user profile. + * @return user profile along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -535,7 +534,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user profile. + * @return user profile on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name, String expand) { @@ -559,7 +558,7 @@ private Mono getAsync(String resourceGroupName, String labName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user profile. + * @return user profile on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name) { @@ -603,7 +602,7 @@ public UserInner get(String resourceGroupName, String labName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user profile. + * @return user profile along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -621,7 +620,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return profile of a lab user along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -682,7 +681,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return profile of a lab user along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -739,16 +738,16 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return the {@link PollerFlux} for polling of profile of a lab user. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, UserInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String name, UserInner user) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, labName, name, user); return this .client .getLroResult( - mono, this.client.getHttpPipeline(), UserInner.class, UserInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), UserInner.class, UserInner.class, this.client.getContext()); } /** @@ -762,9 +761,9 @@ private PollerFlux, UserInner> beginCreateOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return the {@link PollerFlux} for polling of profile of a lab user. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, UserInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String name, UserInner user, Context context) { context = this.client.mergeContext(context); @@ -786,9 +785,9 @@ private PollerFlux, UserInner> beginCreateOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return the {@link SyncPoller} for polling of profile of a lab user. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, UserInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, UserInner user) { return beginCreateOrUpdateAsync(resourceGroupName, labName, name, user).getSyncPoller(); @@ -805,9 +804,9 @@ public SyncPoller, UserInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return the {@link SyncPoller} for polling of profile of a lab user. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, UserInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, UserInner user, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, labName, name, user, context).getSyncPoller(); @@ -823,7 +822,7 @@ public SyncPoller, UserInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return profile of a lab user on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String labName, String name, UserInner user) { @@ -843,7 +842,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String lab * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return profile of a lab user on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -898,7 +897,7 @@ public UserInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -952,7 +951,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1002,14 +1001,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String labName, String name) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, labName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1022,9 +1022,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String labName, String name, Context context) { context = this.client.mergeContext(context); @@ -1043,9 +1043,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String labName, String name) { return beginDeleteAsync(resourceGroupName, labName, name).getSyncPoller(); } @@ -1060,9 +1060,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String name, Context context) { return beginDeleteAsync(resourceGroupName, labName, name, context).getSyncPoller(); @@ -1077,7 +1077,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String name) { @@ -1094,7 +1094,7 @@ private Mono deleteAsync(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String name, Context context) { @@ -1144,7 +1144,7 @@ public void delete(String resourceGroupName, String labName, String name, Contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return profile of a lab user along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1205,7 +1205,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return profile of a lab user along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1262,7 +1262,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return profile of a lab user on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String labName, String name, UserFragment user) { @@ -1305,7 +1305,7 @@ public UserInner update(String resourceGroupName, String labName, String name, U * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return profile of a lab user. + * @return profile of a lab user along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1320,7 +1320,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1356,7 +1357,8 @@ private Mono> listNextSinglePageAsync(String nextLink) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/UsersImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/UsersImpl.java index 2b84a68e2c6e..20cb852a2ec9 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/UsersImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/UsersImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.UserInner; import com.azure.resourcemanager.devtestlabs.models.User; import com.azure.resourcemanager.devtestlabs.models.Users; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class UsersImpl implements Users { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(UsersImpl.class); private final UsersClient innerClient; @@ -80,7 +79,7 @@ public void delete(String resourceGroupName, String labName, String name, Contex public User getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -88,14 +87,14 @@ public User getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "users"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); @@ -107,7 +106,7 @@ public User getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -115,14 +114,14 @@ public Response getByIdWithResponse(String id, String expand, Context cont } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "users"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); @@ -133,7 +132,7 @@ public Response getByIdWithResponse(String id, String expand, Context cont public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -141,14 +140,14 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "users"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); @@ -159,7 +158,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -167,14 +166,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "users"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachineSchedulesClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachineSchedulesClientImpl.java index f48ffd17e939..46c2904d1c55 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachineSchedulesClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachineSchedulesClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.VirtualMachineSchedulesClient; @@ -44,8 +43,6 @@ /** An instance of this class provides access to all the operations defined in VirtualMachineSchedulesClient. */ public final class VirtualMachineSchedulesClientImpl implements VirtualMachineSchedulesClient { - private final ClientLogger logger = new ClientLogger(VirtualMachineSchedulesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VirtualMachineSchedulesService service; @@ -203,7 +200,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -281,7 +279,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -356,7 +355,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -381,7 +380,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName, String virtualMachineName) { @@ -408,7 +407,7 @@ private PagedFlux listAsync(String resourceGroupName, String labN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -436,7 +435,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName, String virtualMachineName) { @@ -462,7 +461,7 @@ public PagedIterable list(String resourceGroupName, String labNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -489,7 +488,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -551,7 +550,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -614,7 +613,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -640,7 +639,7 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -687,7 +686,7 @@ public ScheduleInner get(String resourceGroupName, String labName, String virtua * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -711,7 +710,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -778,7 +777,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -846,7 +845,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -893,7 +892,7 @@ public ScheduleInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -917,7 +916,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -977,7 +976,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -1033,7 +1032,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String virtualMachineName, String name) { @@ -1068,7 +1067,7 @@ public void delete(String resourceGroupName, String labName, String virtualMachi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -1087,7 +1086,7 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1154,7 +1153,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1222,7 +1221,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1269,7 +1268,7 @@ public ScheduleInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1292,7 +1291,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> executeWithResponseAsync( @@ -1352,7 +1351,7 @@ private Mono>> executeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> executeWithResponseAsync( @@ -1408,16 +1407,17 @@ private Mono>> executeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginExecuteAsync( String resourceGroupName, String labName, String virtualMachineName, String name) { Mono>> mono = executeWithResponseAsync(resourceGroupName, labName, virtualMachineName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1431,9 +1431,9 @@ private PollerFlux, Void> beginExecuteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginExecuteAsync( String resourceGroupName, String labName, String virtualMachineName, String name, Context context) { context = this.client.mergeContext(context); @@ -1454,9 +1454,9 @@ private PollerFlux, Void> beginExecuteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginExecute( String resourceGroupName, String labName, String virtualMachineName, String name) { return beginExecuteAsync(resourceGroupName, labName, virtualMachineName, name).getSyncPoller(); @@ -1473,9 +1473,9 @@ public SyncPoller, Void> beginExecute( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginExecute( String resourceGroupName, String labName, String virtualMachineName, String name, Context context) { return beginExecuteAsync(resourceGroupName, labName, virtualMachineName, name, context).getSyncPoller(); @@ -1491,7 +1491,7 @@ public SyncPoller, Void> beginExecute( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono executeAsync(String resourceGroupName, String labName, String virtualMachineName, String name) { @@ -1511,7 +1511,7 @@ private Mono executeAsync(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono executeAsync( @@ -1562,7 +1562,8 @@ public void execute( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1598,7 +1599,8 @@ private Mono> listNextSinglePageAsync(String nextLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachineSchedulesImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachineSchedulesImpl.java index 0a4edb1a7ef1..90f189f51c57 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachineSchedulesImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachineSchedulesImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.devtestlabs.models.Schedule; import com.azure.resourcemanager.devtestlabs.models.ScheduleFragment; import com.azure.resourcemanager.devtestlabs.models.VirtualMachineSchedules; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VirtualMachineSchedulesImpl implements VirtualMachineSchedules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineSchedulesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineSchedulesImpl.class); private final VirtualMachineSchedulesClient innerClient; diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachinesClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachinesClientImpl.java index 6b29a2bf4d84..284f02aba75e 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachinesClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachinesClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.VirtualMachinesClient; @@ -50,8 +49,6 @@ /** An instance of this class provides access to all the operations defined in VirtualMachinesClient. */ public final class VirtualMachinesClientImpl implements VirtualMachinesClient { - private final ClientLogger logger = new ClientLogger(VirtualMachinesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VirtualMachinesService service; @@ -398,7 +395,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -465,7 +463,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -534,7 +533,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -552,7 +551,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName) { @@ -579,7 +578,7 @@ private PagedFlux listAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -603,7 +602,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName) { @@ -628,7 +627,7 @@ public PagedIterable list(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -653,7 +652,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -710,7 +709,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -763,7 +762,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -788,7 +787,7 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name) { @@ -833,7 +832,7 @@ public LabVirtualMachineInner get(String resourceGroupName, String labName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -851,7 +850,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return a virtual machine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -913,7 +912,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return a virtual machine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -975,9 +974,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return the {@link PollerFlux} for polling of a virtual machine. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LabVirtualMachineInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String name, LabVirtualMachineInner labVirtualMachine) { Mono>> mono = @@ -989,7 +988,7 @@ private PollerFlux, LabVirtualMachineInner> b this.client.getHttpPipeline(), LabVirtualMachineInner.class, LabVirtualMachineInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1003,9 +1002,9 @@ private PollerFlux, LabVirtualMachineInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return the {@link PollerFlux} for polling of a virtual machine. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LabVirtualMachineInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, @@ -1035,9 +1034,9 @@ private PollerFlux, LabVirtualMachineInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return the {@link SyncPoller} for polling of a virtual machine. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LabVirtualMachineInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, LabVirtualMachineInner labVirtualMachine) { return beginCreateOrUpdateAsync(resourceGroupName, labName, name, labVirtualMachine).getSyncPoller(); @@ -1054,9 +1053,9 @@ public SyncPoller, LabVirtualMachineInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return the {@link SyncPoller} for polling of a virtual machine. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LabVirtualMachineInner> beginCreateOrUpdate( String resourceGroupName, String labName, @@ -1076,7 +1075,7 @@ public SyncPoller, LabVirtualMachineInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return a virtual machine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -1097,7 +1096,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return a virtual machine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -1161,7 +1160,7 @@ public LabVirtualMachineInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1215,7 +1214,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1265,14 +1264,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String labName, String name) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, labName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1285,9 +1285,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String labName, String name, Context context) { context = this.client.mergeContext(context); @@ -1306,9 +1306,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String labName, String name) { return beginDeleteAsync(resourceGroupName, labName, name).getSyncPoller(); } @@ -1323,9 +1323,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String name, Context context) { return beginDeleteAsync(resourceGroupName, labName, name, context).getSyncPoller(); @@ -1340,7 +1340,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String name) { @@ -1357,7 +1357,7 @@ private Mono deleteAsync(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String name, Context context) { @@ -1407,7 +1407,7 @@ public void delete(String resourceGroupName, String labName, String name, Contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return a virtual machine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1469,7 +1469,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return a virtual machine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1531,7 +1531,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return a virtual machine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1576,7 +1576,7 @@ public LabVirtualMachineInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine. + * @return a virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1598,7 +1598,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> addDataDiskWithResponseAsync( @@ -1660,7 +1660,7 @@ private Mono>> addDataDiskWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> addDataDiskWithResponseAsync( @@ -1718,16 +1718,17 @@ private Mono>> addDataDiskWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginAddDataDiskAsync( String resourceGroupName, String labName, String name, DataDiskProperties dataDiskProperties) { Mono>> mono = addDataDiskWithResponseAsync(resourceGroupName, labName, name, dataDiskProperties); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1741,9 +1742,9 @@ private PollerFlux, Void> beginAddDataDiskAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginAddDataDiskAsync( String resourceGroupName, String labName, String name, DataDiskProperties dataDiskProperties, Context context) { context = this.client.mergeContext(context); @@ -1764,9 +1765,9 @@ private PollerFlux, Void> beginAddDataDiskAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginAddDataDisk( String resourceGroupName, String labName, String name, DataDiskProperties dataDiskProperties) { return beginAddDataDiskAsync(resourceGroupName, labName, name, dataDiskProperties).getSyncPoller(); @@ -1783,9 +1784,9 @@ public SyncPoller, Void> beginAddDataDisk( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginAddDataDisk( String resourceGroupName, String labName, String name, DataDiskProperties dataDiskProperties, Context context) { return beginAddDataDiskAsync(resourceGroupName, labName, name, dataDiskProperties, context).getSyncPoller(); @@ -1801,7 +1802,7 @@ public SyncPoller, Void> beginAddDataDisk( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono addDataDiskAsync( @@ -1822,7 +1823,7 @@ private Mono addDataDiskAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono addDataDiskAsync( @@ -1877,7 +1878,7 @@ public void addDataDisk( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> applyArtifactsWithResponseAsync( @@ -1939,7 +1940,7 @@ private Mono>> applyArtifactsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> applyArtifactsWithResponseAsync( @@ -2001,16 +2002,17 @@ private Mono>> applyArtifactsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginApplyArtifactsAsync( String resourceGroupName, String labName, String name, ApplyArtifactsRequest applyArtifactsRequest) { Mono>> mono = applyArtifactsWithResponseAsync(resourceGroupName, labName, name, applyArtifactsRequest); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2024,9 +2026,9 @@ private PollerFlux, Void> beginApplyArtifactsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginApplyArtifactsAsync( String resourceGroupName, String labName, @@ -2051,9 +2053,9 @@ private PollerFlux, Void> beginApplyArtifactsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginApplyArtifacts( String resourceGroupName, String labName, String name, ApplyArtifactsRequest applyArtifactsRequest) { return beginApplyArtifactsAsync(resourceGroupName, labName, name, applyArtifactsRequest).getSyncPoller(); @@ -2070,9 +2072,9 @@ public SyncPoller, Void> beginApplyArtifacts( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginApplyArtifacts( String resourceGroupName, String labName, @@ -2093,7 +2095,7 @@ public SyncPoller, Void> beginApplyArtifacts( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono applyArtifactsAsync( @@ -2114,7 +2116,7 @@ private Mono applyArtifactsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono applyArtifactsAsync( @@ -2176,7 +2178,7 @@ public void applyArtifacts( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> claimWithResponseAsync( @@ -2230,7 +2232,7 @@ private Mono>> claimWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> claimWithResponseAsync( @@ -2280,14 +2282,15 @@ private Mono>> claimWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginClaimAsync(String resourceGroupName, String labName, String name) { Mono>> mono = claimWithResponseAsync(resourceGroupName, labName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2300,9 +2303,9 @@ private PollerFlux, Void> beginClaimAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginClaimAsync( String resourceGroupName, String labName, String name, Context context) { context = this.client.mergeContext(context); @@ -2321,9 +2324,9 @@ private PollerFlux, Void> beginClaimAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginClaim(String resourceGroupName, String labName, String name) { return beginClaimAsync(resourceGroupName, labName, name).getSyncPoller(); } @@ -2338,9 +2341,9 @@ public SyncPoller, Void> beginClaim(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginClaim( String resourceGroupName, String labName, String name, Context context) { return beginClaimAsync(resourceGroupName, labName, name, context).getSyncPoller(); @@ -2355,7 +2358,7 @@ public SyncPoller, Void> beginClaim( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono claimAsync(String resourceGroupName, String labName, String name) { @@ -2372,7 +2375,7 @@ private Mono claimAsync(String resourceGroupName, String labName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono claimAsync(String resourceGroupName, String labName, String name, Context context) { @@ -2422,7 +2425,7 @@ public void claim(String resourceGroupName, String labName, String name, Context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> detachDataDiskWithResponseAsync( @@ -2485,7 +2488,7 @@ private Mono>> detachDataDiskWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> detachDataDiskWithResponseAsync( @@ -2548,16 +2551,17 @@ private Mono>> detachDataDiskWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDetachDataDiskAsync( String resourceGroupName, String labName, String name, DetachDataDiskProperties detachDataDiskProperties) { Mono>> mono = detachDataDiskWithResponseAsync(resourceGroupName, labName, name, detachDataDiskProperties); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2571,9 +2575,9 @@ private PollerFlux, Void> beginDetachDataDiskAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDetachDataDiskAsync( String resourceGroupName, String labName, @@ -2598,9 +2602,9 @@ private PollerFlux, Void> beginDetachDataDiskAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDetachDataDisk( String resourceGroupName, String labName, String name, DetachDataDiskProperties detachDataDiskProperties) { return beginDetachDataDiskAsync(resourceGroupName, labName, name, detachDataDiskProperties).getSyncPoller(); @@ -2617,9 +2621,9 @@ public SyncPoller, Void> beginDetachDataDisk( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDetachDataDisk( String resourceGroupName, String labName, @@ -2640,7 +2644,7 @@ public SyncPoller, Void> beginDetachDataDisk( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono detachDataDiskAsync( @@ -2661,7 +2665,7 @@ private Mono detachDataDiskAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono detachDataDiskAsync( @@ -2723,7 +2727,8 @@ public void detachDataDisk( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a string that represents the contents of the RDP file for the virtual machine. + * @return a string that represents the contents of the RDP file for the virtual machine along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getRdpFileContentsWithResponseAsync( @@ -2777,7 +2782,8 @@ private Mono> getRdpFileContentsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a string that represents the contents of the RDP file for the virtual machine. + * @return a string that represents the contents of the RDP file for the virtual machine along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getRdpFileContentsWithResponseAsync( @@ -2827,7 +2833,8 @@ private Mono> getRdpFileContentsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a string that represents the contents of the RDP file for the virtual machine. + * @return a string that represents the contents of the RDP file for the virtual machine on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getRdpFileContentsAsync(String resourceGroupName, String labName, String name) { @@ -2868,7 +2875,8 @@ public RdpConnectionInner getRdpFileContents(String resourceGroupName, String la * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a string that represents the contents of the RDP file for the virtual machine. + * @return a string that represents the contents of the RDP file for the virtual machine along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getRdpFileContentsWithResponse( @@ -2885,7 +2893,8 @@ public Response getRdpFileContentsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listApplicableSchedulesWithResponseAsync( @@ -2939,7 +2948,8 @@ private Mono> listApplicableSchedulesWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listApplicableSchedulesWithResponseAsync( @@ -2989,7 +2999,7 @@ private Mono> listApplicableSchedulesWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listApplicableSchedulesAsync( @@ -3031,7 +3041,7 @@ public ApplicableScheduleInner listApplicableSchedules(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listApplicableSchedulesWithResponse( @@ -3048,7 +3058,7 @@ public Response listApplicableSchedulesWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> redeployWithResponseAsync( @@ -3102,7 +3112,7 @@ private Mono>> redeployWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> redeployWithResponseAsync( @@ -3152,15 +3162,16 @@ private Mono>> redeployWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRedeployAsync( String resourceGroupName, String labName, String name) { Mono>> mono = redeployWithResponseAsync(resourceGroupName, labName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -3173,9 +3184,9 @@ private PollerFlux, Void> beginRedeployAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRedeployAsync( String resourceGroupName, String labName, String name, Context context) { context = this.client.mergeContext(context); @@ -3194,9 +3205,9 @@ private PollerFlux, Void> beginRedeployAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRedeploy(String resourceGroupName, String labName, String name) { return beginRedeployAsync(resourceGroupName, labName, name).getSyncPoller(); } @@ -3211,9 +3222,9 @@ public SyncPoller, Void> beginRedeploy(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRedeploy( String resourceGroupName, String labName, String name, Context context) { return beginRedeployAsync(resourceGroupName, labName, name, context).getSyncPoller(); @@ -3228,7 +3239,7 @@ public SyncPoller, Void> beginRedeploy( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono redeployAsync(String resourceGroupName, String labName, String name) { @@ -3247,7 +3258,7 @@ private Mono redeployAsync(String resourceGroupName, String labName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono redeployAsync(String resourceGroupName, String labName, String name, Context context) { @@ -3297,7 +3308,7 @@ public void redeploy(String resourceGroupName, String labName, String name, Cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> resizeWithResponseAsync( @@ -3364,7 +3375,7 @@ private Mono>> resizeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> resizeWithResponseAsync( @@ -3428,9 +3439,9 @@ private Mono>> resizeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginResizeAsync( String resourceGroupName, String labName, @@ -3440,7 +3451,8 @@ private PollerFlux, Void> beginResizeAsync( resizeWithResponseAsync(resourceGroupName, labName, name, resizeLabVirtualMachineProperties); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -3454,9 +3466,9 @@ private PollerFlux, Void> beginResizeAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginResizeAsync( String resourceGroupName, String labName, @@ -3481,9 +3493,9 @@ private PollerFlux, Void> beginResizeAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginResize( String resourceGroupName, String labName, @@ -3503,9 +3515,9 @@ public SyncPoller, Void> beginResize( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginResize( String resourceGroupName, String labName, @@ -3526,7 +3538,7 @@ public SyncPoller, Void> beginResize( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resizeAsync( @@ -3550,7 +3562,7 @@ private Mono resizeAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resizeAsync( @@ -3615,7 +3627,7 @@ public void resize( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync( @@ -3669,7 +3681,7 @@ private Mono>> restartWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync( @@ -3719,15 +3731,16 @@ private Mono>> restartWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRestartAsync( String resourceGroupName, String labName, String name) { Mono>> mono = restartWithResponseAsync(resourceGroupName, labName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -3740,9 +3753,9 @@ private PollerFlux, Void> beginRestartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRestartAsync( String resourceGroupName, String labName, String name, Context context) { context = this.client.mergeContext(context); @@ -3761,9 +3774,9 @@ private PollerFlux, Void> beginRestartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestart(String resourceGroupName, String labName, String name) { return beginRestartAsync(resourceGroupName, labName, name).getSyncPoller(); } @@ -3778,9 +3791,9 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestart( String resourceGroupName, String labName, String name, Context context) { return beginRestartAsync(resourceGroupName, labName, name, context).getSyncPoller(); @@ -3795,7 +3808,7 @@ public SyncPoller, Void> beginRestart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restartAsync(String resourceGroupName, String labName, String name) { @@ -3814,7 +3827,7 @@ private Mono restartAsync(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restartAsync(String resourceGroupName, String labName, String name, Context context) { @@ -3863,7 +3876,7 @@ public void restart(String resourceGroupName, String labName, String name, Conte * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( @@ -3917,7 +3930,7 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( @@ -3967,14 +3980,15 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync(String resourceGroupName, String labName, String name) { Mono>> mono = startWithResponseAsync(resourceGroupName, labName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -3987,9 +4001,9 @@ private PollerFlux, Void> beginStartAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( String resourceGroupName, String labName, String name, Context context) { context = this.client.mergeContext(context); @@ -4008,9 +4022,9 @@ private PollerFlux, Void> beginStartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart(String resourceGroupName, String labName, String name) { return beginStartAsync(resourceGroupName, labName, name).getSyncPoller(); } @@ -4025,9 +4039,9 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart( String resourceGroupName, String labName, String name, Context context) { return beginStartAsync(resourceGroupName, labName, name, context).getSyncPoller(); @@ -4042,7 +4056,7 @@ public SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String labName, String name) { @@ -4059,7 +4073,7 @@ private Mono startAsync(String resourceGroupName, String labName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String labName, String name, Context context) { @@ -4108,7 +4122,7 @@ public void start(String resourceGroupName, String labName, String name, Context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( @@ -4162,7 +4176,7 @@ private Mono>> stopWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( @@ -4212,14 +4226,15 @@ private Mono>> stopWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync(String resourceGroupName, String labName, String name) { Mono>> mono = stopWithResponseAsync(resourceGroupName, labName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -4232,9 +4247,9 @@ private PollerFlux, Void> beginStopAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( String resourceGroupName, String labName, String name, Context context) { context = this.client.mergeContext(context); @@ -4253,9 +4268,9 @@ private PollerFlux, Void> beginStopAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop(String resourceGroupName, String labName, String name) { return beginStopAsync(resourceGroupName, labName, name).getSyncPoller(); } @@ -4270,9 +4285,9 @@ public SyncPoller, Void> beginStop(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( String resourceGroupName, String labName, String name, Context context) { return beginStopAsync(resourceGroupName, labName, name, context).getSyncPoller(); @@ -4287,7 +4302,7 @@ public SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String labName, String name) { @@ -4304,7 +4319,7 @@ private Mono stopAsync(String resourceGroupName, String labName, String na * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String labName, String name, Context context) { @@ -4354,7 +4369,7 @@ public void stop(String resourceGroupName, String labName, String name, Context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> transferDisksWithResponseAsync( @@ -4409,7 +4424,7 @@ private Mono>> transferDisksWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> transferDisksWithResponseAsync( @@ -4460,15 +4475,16 @@ private Mono>> transferDisksWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginTransferDisksAsync( String resourceGroupName, String labName, String name) { Mono>> mono = transferDisksWithResponseAsync(resourceGroupName, labName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -4482,9 +4498,9 @@ private PollerFlux, Void> beginTransferDisksAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginTransferDisksAsync( String resourceGroupName, String labName, String name, Context context) { context = this.client.mergeContext(context); @@ -4505,9 +4521,9 @@ private PollerFlux, Void> beginTransferDisksAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginTransferDisks( String resourceGroupName, String labName, String name) { return beginTransferDisksAsync(resourceGroupName, labName, name).getSyncPoller(); @@ -4524,9 +4540,9 @@ public SyncPoller, Void> beginTransferDisks( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginTransferDisks( String resourceGroupName, String labName, String name, Context context) { return beginTransferDisksAsync(resourceGroupName, labName, name, context).getSyncPoller(); @@ -4542,7 +4558,7 @@ public SyncPoller, Void> beginTransferDisks( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono transferDisksAsync(String resourceGroupName, String labName, String name) { @@ -4562,7 +4578,7 @@ private Mono transferDisksAsync(String resourceGroupName, String labName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono transferDisksAsync(String resourceGroupName, String labName, String name, Context context) { @@ -4613,7 +4629,7 @@ public void transferDisks(String resourceGroupName, String labName, String name, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> unClaimWithResponseAsync( @@ -4667,7 +4683,7 @@ private Mono>> unClaimWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> unClaimWithResponseAsync( @@ -4717,15 +4733,16 @@ private Mono>> unClaimWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginUnClaimAsync( String resourceGroupName, String labName, String name) { Mono>> mono = unClaimWithResponseAsync(resourceGroupName, labName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -4738,9 +4755,9 @@ private PollerFlux, Void> beginUnClaimAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginUnClaimAsync( String resourceGroupName, String labName, String name, Context context) { context = this.client.mergeContext(context); @@ -4759,9 +4776,9 @@ private PollerFlux, Void> beginUnClaimAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUnClaim(String resourceGroupName, String labName, String name) { return beginUnClaimAsync(resourceGroupName, labName, name).getSyncPoller(); } @@ -4776,9 +4793,9 @@ public SyncPoller, Void> beginUnClaim(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUnClaim( String resourceGroupName, String labName, String name, Context context) { return beginUnClaimAsync(resourceGroupName, labName, name, context).getSyncPoller(); @@ -4793,7 +4810,7 @@ public SyncPoller, Void> beginUnClaim( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono unClaimAsync(String resourceGroupName, String labName, String name) { @@ -4812,7 +4829,7 @@ private Mono unClaimAsync(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono unClaimAsync(String resourceGroupName, String labName, String name, Context context) { @@ -4859,7 +4876,8 @@ public void unClaim(String resourceGroupName, String labName, String name, Conte * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -4895,7 +4913,8 @@ private Mono> listNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachinesImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachinesImpl.java index b44d78c408f1..4745cce574c7 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachinesImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualMachinesImpl.java @@ -21,10 +21,9 @@ import com.azure.resourcemanager.devtestlabs.models.RdpConnection; import com.azure.resourcemanager.devtestlabs.models.ResizeLabVirtualMachineProperties; import com.azure.resourcemanager.devtestlabs.models.VirtualMachines; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VirtualMachinesImpl implements VirtualMachines { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachinesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VirtualMachinesImpl.class); private final VirtualMachinesClient innerClient; @@ -248,7 +247,7 @@ public void unClaim(String resourceGroupName, String labName, String name, Conte public LabVirtualMachine getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -256,14 +255,14 @@ public LabVirtualMachine getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "virtualmachines"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -276,7 +275,7 @@ public LabVirtualMachine getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -284,14 +283,14 @@ public Response getByIdWithResponse(String id, String expand, } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "virtualmachines"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -303,7 +302,7 @@ public Response getByIdWithResponse(String id, String expand, public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -311,14 +310,14 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "virtualmachines"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -330,7 +329,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -338,14 +337,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "virtualmachines"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualNetworksClientImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualNetworksClientImpl.java index 00c64127a8d9..261edc790b02 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualNetworksClientImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualNetworksClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devtestlabs.fluent.VirtualNetworksClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in VirtualNetworksClient. */ public final class VirtualNetworksClientImpl implements VirtualNetworksClient { - private final ClientLogger logger = new ClientLogger(VirtualNetworksClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VirtualNetworksService service; @@ -178,7 +175,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -244,7 +242,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -312,7 +311,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -330,7 +329,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String labName) { @@ -356,7 +355,7 @@ private PagedFlux listAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -380,7 +379,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String labName) { @@ -404,7 +403,7 @@ public PagedIterable list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -428,7 +427,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network. + * @return virtual network along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -484,7 +483,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network. + * @return virtual network along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -536,7 +535,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network. + * @return virtual network on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name, String expand) { @@ -560,7 +559,7 @@ private Mono getAsync(String resourceGroupName, String labN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network. + * @return virtual network on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String name) { @@ -604,7 +603,7 @@ public VirtualNetworkInner get(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network. + * @return virtual network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -622,7 +621,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return a virtual network along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -683,7 +682,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return a virtual network along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -740,9 +739,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return the {@link PollerFlux} for polling of a virtual network. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualNetworkInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork) { Mono>> mono = @@ -754,7 +753,7 @@ private PollerFlux, VirtualNetworkInner> beginCr this.client.getHttpPipeline(), VirtualNetworkInner.class, VirtualNetworkInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -768,9 +767,9 @@ private PollerFlux, VirtualNetworkInner> beginCr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return the {@link PollerFlux} for polling of a virtual network. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualNetworkInner> beginCreateOrUpdateAsync( String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork, Context context) { context = this.client.mergeContext(context); @@ -792,9 +791,9 @@ private PollerFlux, VirtualNetworkInner> beginCr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return the {@link SyncPoller} for polling of a virtual network. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualNetworkInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork) { return beginCreateOrUpdateAsync(resourceGroupName, labName, name, virtualNetwork).getSyncPoller(); @@ -811,9 +810,9 @@ public SyncPoller, VirtualNetworkInner> beginCre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return the {@link SyncPoller} for polling of a virtual network. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualNetworkInner> beginCreateOrUpdate( String resourceGroupName, String labName, String name, VirtualNetworkInner virtualNetwork, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, labName, name, virtualNetwork, context).getSyncPoller(); @@ -829,7 +828,7 @@ public SyncPoller, VirtualNetworkInner> beginCre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return a virtual network on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -850,7 +849,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return a virtual network on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -906,7 +905,7 @@ public VirtualNetworkInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -960,7 +959,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1010,14 +1009,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String labName, String name) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, labName, name); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1030,9 +1030,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String labName, String name, Context context) { context = this.client.mergeContext(context); @@ -1051,9 +1051,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String labName, String name) { return beginDeleteAsync(resourceGroupName, labName, name).getSyncPoller(); } @@ -1068,9 +1068,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String labName, String name, Context context) { return beginDeleteAsync(resourceGroupName, labName, name, context).getSyncPoller(); @@ -1085,7 +1085,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String name) { @@ -1102,7 +1102,7 @@ private Mono deleteAsync(String resourceGroupName, String labName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String labName, String name, Context context) { @@ -1152,7 +1152,7 @@ public void delete(String resourceGroupName, String labName, String name, Contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return a virtual network along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1213,7 +1213,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return a virtual network along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1270,7 +1270,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return a virtual network on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1315,7 +1315,7 @@ public VirtualNetworkInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network. + * @return a virtual network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1330,7 +1330,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1366,7 +1367,8 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualNetworksImpl.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualNetworksImpl.java index 261679ec462f..b4724188283b 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualNetworksImpl.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/VirtualNetworksImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.devtestlabs.fluent.models.VirtualNetworkInner; import com.azure.resourcemanager.devtestlabs.models.VirtualNetwork; import com.azure.resourcemanager.devtestlabs.models.VirtualNetworks; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VirtualNetworksImpl implements VirtualNetworks { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworksImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworksImpl.class); private final VirtualNetworksClient innerClient; @@ -81,7 +80,7 @@ public void delete(String resourceGroupName, String labName, String name, Contex public VirtualNetwork getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -89,14 +88,14 @@ public VirtualNetwork getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "virtualnetworks"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -109,7 +108,7 @@ public VirtualNetwork getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -117,14 +116,14 @@ public Response getByIdWithResponse(String id, String expand, Co } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "virtualnetworks"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -136,7 +135,7 @@ public Response getByIdWithResponse(String id, String expand, Co public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -144,14 +143,14 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "virtualnetworks"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -163,7 +162,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -171,14 +170,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String name = Utils.getValueFromIdByName(id, "virtualnetworks"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ApplicableScheduleFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ApplicableScheduleFragment.java index 8d58391939e9..9e5b2befd977 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ApplicableScheduleFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ApplicableScheduleFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** Schedules applicable to a virtual machine. The schedules may have been defined on a VM or on lab level. */ -@Immutable +@Fluent public final class ApplicableScheduleFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicableScheduleFragment.class); - /** {@inheritDoc} */ @Override public ApplicableScheduleFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ApplicableScheduleProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ApplicableScheduleProperties.java new file mode 100644 index 000000000000..7cdc8c948b7b --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ApplicableScheduleProperties.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.models; + +import com.azure.resourcemanager.devtestlabs.fluent.models.ApplicableSchedulePropertiesInner; + +/** An immutable client-side representation of ApplicableScheduleProperties. */ +public interface ApplicableScheduleProperties { + /** + * Gets the labVmsShutdown property: The auto-shutdown schedule, if one has been set at the lab or lab resource + * level. + * + * @return the labVmsShutdown value. + */ + Schedule labVmsShutdown(); + + /** + * Gets the labVmsStartup property: The auto-startup schedule, if one has been set at the lab or lab resource level. + * + * @return the labVmsStartup value. + */ + Schedule labVmsStartup(); + + /** + * Gets the inner com.azure.resourcemanager.devtestlabs.fluent.models.ApplicableSchedulePropertiesInner object. + * + * @return the inner object. + */ + ApplicableSchedulePropertiesInner innerModel(); +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ApplyArtifactsRequest.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ApplyArtifactsRequest.java index 1b734e6cda74..40f6d6ba253c 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ApplyArtifactsRequest.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ApplyArtifactsRequest.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Request body for applying artifacts to a virtual machine. */ @Fluent public final class ApplyArtifactsRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplyArtifactsRequest.class); - /* * The list of artifacts to apply. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArmTemplateList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArmTemplateList.java index 67a29f431656..b506e58342a1 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArmTemplateList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArmTemplateList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.ArmTemplateInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class ArmTemplateList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmTemplateList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArmTemplateParameterProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArmTemplateParameterProperties.java index 9abd38224a27..aa0c5f93ca6f 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArmTemplateParameterProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArmTemplateParameterProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of an Azure Resource Manager template parameter. */ @Fluent public final class ArmTemplateParameterProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmTemplateParameterProperties.class); - /* * The name of the template parameter. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArmTemplates.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArmTemplates.java index 402da0da244c..70c4bcc172f1 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArmTemplates.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArmTemplates.java @@ -19,7 +19,7 @@ public interface ArmTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName, String artifactSourceName); @@ -37,7 +37,7 @@ public interface ArmTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -75,7 +75,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure resource manager template. + * @return azure resource manager template along with {@link Response}. */ Response getWithResponse( String resourceGroupName, diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactDeploymentStatusProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactDeploymentStatusProperties.java index e4d551c9552c..af88e86a0ce8 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactDeploymentStatusProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactDeploymentStatusProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of an artifact deployment. */ @Fluent public final class ArtifactDeploymentStatusProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactDeploymentStatusProperties.class); - /* * The deployment status of the artifact. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactInstallProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactInstallProperties.java index 81ccc8711ca5..ecb74c196a93 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactInstallProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactInstallProperties.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -14,8 +12,6 @@ /** Properties of an artifact. */ @Fluent public final class ArtifactInstallProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactInstallProperties.class); - /* * The artifact's identifier. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactList.java index 8ff2c763013e..2c563a1654c3 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.ArtifactInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class ArtifactList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactParameterProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactParameterProperties.java index e2be65b516f4..a799903a88fd 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactParameterProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactParameterProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of an artifact parameter. */ @Fluent public final class ArtifactParameterProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactParameterProperties.class); - /* * The name of the artifact parameter. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactSourceFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactSourceFragment.java index 3f85e8bbbb64..f0df2b911335 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactSourceFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactSourceFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** Properties of an artifact source. */ -@Immutable +@Fluent public final class ArtifactSourceFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactSourceFragment.class); - /** {@inheritDoc} */ @Override public ArtifactSourceFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactSourceList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactSourceList.java index f804d23214fd..cedb4569a717 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactSourceList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactSourceList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.ArtifactSourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class ArtifactSourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactSourceList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactSources.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactSources.java index bce949b8b16c..f226ad12c444 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactSources.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ArtifactSources.java @@ -18,7 +18,7 @@ public interface ArtifactSources { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName); @@ -35,7 +35,7 @@ public interface ArtifactSources { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -70,7 +70,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact source. + * @return artifact source along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String name, String expand, Context context); @@ -97,7 +97,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context); @@ -108,7 +108,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact source. + * @return artifact source along with {@link Response}. */ ArtifactSource getById(String id); @@ -121,7 +121,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact source. + * @return artifact source along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); @@ -143,7 +143,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Artifacts.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Artifacts.java index ab048bf73dbe..d1895b050e14 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Artifacts.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Artifacts.java @@ -19,7 +19,7 @@ public interface Artifacts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName, String artifactSourceName); @@ -37,7 +37,7 @@ public interface Artifacts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -75,7 +75,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return artifact. + * @return artifact along with {@link Response}. */ Response getWithResponse( String resourceGroupName, @@ -119,7 +119,7 @@ ArmTemplateInfo generateArmTemplate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a generated ARM template. + * @return information about a generated ARM template along with {@link Response}. */ Response generateArmTemplateWithResponse( String resourceGroupName, diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/AttachDiskProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/AttachDiskProperties.java index 7e762cfbd61d..63e8085974a7 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/AttachDiskProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/AttachDiskProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of the disk to attach. */ @Fluent public final class AttachDiskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AttachDiskProperties.class); - /* * The resource ID of the Lab virtual machine to which the disk is * attached. diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/AttachNewDataDiskOptions.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/AttachNewDataDiskOptions.java index 5670c4db1df8..5e8be4d92514 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/AttachNewDataDiskOptions.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/AttachNewDataDiskOptions.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties to attach new disk to the Virtual Machine. */ @Fluent public final class AttachNewDataDiskOptions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AttachNewDataDiskOptions.class); - /* * Size of the disk to be attached in Gibibytes. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/BulkCreationParameters.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/BulkCreationParameters.java index a6e65e513300..7a3bad1243f3 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/BulkCreationParameters.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/BulkCreationParameters.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Parameters for creating multiple virtual machines as a single action. */ @Fluent public final class BulkCreationParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BulkCreationParameters.class); - /* * The number of virtual machine instances to create. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ComputeDataDisk.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ComputeDataDisk.java index 885b06b07d96..7b1159917a87 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ComputeDataDisk.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ComputeDataDisk.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A data disks attached to a virtual machine. */ @Fluent public final class ComputeDataDisk { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputeDataDisk.class); - /* * Gets data disk name. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ComputeVmInstanceViewStatus.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ComputeVmInstanceViewStatus.java index 80018920925e..dcb0450f05dd 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ComputeVmInstanceViewStatus.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ComputeVmInstanceViewStatus.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Status information about a virtual machine. */ @Fluent public final class ComputeVmInstanceViewStatus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputeVmInstanceViewStatus.class); - /* * Gets the status Code. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ComputeVmProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ComputeVmProperties.java index fe66c661f455..3d1577dfac98 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ComputeVmProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ComputeVmProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of a virtual machine returned by the Microsoft.Compute API. */ @Fluent public final class ComputeVmProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputeVmProperties.class); - /* * Gets the statuses of the virtual machine. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CostThresholdProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CostThresholdProperties.java index 05a8fdc9adbc..8f0ab47d358c 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CostThresholdProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CostThresholdProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a cost threshold item. */ @Fluent public final class CostThresholdProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CostThresholdProperties.class); - /* * The ID of the cost threshold item. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Costs.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Costs.java index 1f341bab73ac..c1c45f29371a 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Costs.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Costs.java @@ -33,7 +33,7 @@ public interface Costs { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cost. + * @return cost along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String name, String expand, Context context); @@ -45,7 +45,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cost. + * @return cost along with {@link Response}. */ LabCost getById(String id); @@ -58,7 +58,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cost. + * @return cost along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImageFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImageFragment.java index d4cf59c9c3ee..e309d721aff6 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImageFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImageFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** A custom image. */ -@Immutable +@Fluent public final class CustomImageFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomImageFragment.class); - /** {@inheritDoc} */ @Override public CustomImageFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImageList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImageList.java index b8dc4ec94f93..8e6ba7159f3c 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImageList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImageList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.CustomImageInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class CustomImageList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomImageList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImagePropertiesCustom.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImagePropertiesCustom.java index 50c6747c88f4..2c35522c2e5f 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImagePropertiesCustom.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImagePropertiesCustom.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties for creating a custom image from a VHD. */ @Fluent public final class CustomImagePropertiesCustom { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomImagePropertiesCustom.class); - /* * The image name. */ @@ -99,10 +96,12 @@ public CustomImagePropertiesCustom withOsType(CustomImageOsType osType) { */ public void validate() { if (osType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property osType in model CustomImagePropertiesCustom")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CustomImagePropertiesCustom.class); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImagePropertiesFromPlan.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImagePropertiesFromPlan.java index 10542dff3d5a..ffb17d4cc2c3 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImagePropertiesFromPlan.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImagePropertiesFromPlan.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties for plan on a custom image. */ @Fluent public final class CustomImagePropertiesFromPlan { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomImagePropertiesFromPlan.class); - /* * The id of the plan, equivalent to name of the plan */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImagePropertiesFromVm.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImagePropertiesFromVm.java index 8817df65562b..22c162cba43c 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImagePropertiesFromVm.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImagePropertiesFromVm.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties for creating a custom image from a virtual machine. */ @Fluent public final class CustomImagePropertiesFromVm { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomImagePropertiesFromVm.class); - /* * The source vm identifier. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImages.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImages.java index 8b395310c03c..0fbca354b233 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImages.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/CustomImages.java @@ -18,7 +18,7 @@ public interface CustomImages { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName); @@ -35,7 +35,7 @@ public interface CustomImages { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -70,7 +70,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom image. + * @return custom image along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String name, String expand, Context context); @@ -107,7 +107,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom image. + * @return custom image along with {@link Response}. */ CustomImage getById(String id); @@ -120,7 +120,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom image. + * @return custom image along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DataDiskProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DataDiskProperties.java index ff5a950e946e..8d5e765b0fd5 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DataDiskProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DataDiskProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Request body for adding a new or existing data disk to a virtual machine. */ @Fluent public final class DataDiskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataDiskProperties.class); - /* * Specifies options to attach a new disk to the virtual machine. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DataDiskStorageTypeInfo.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DataDiskStorageTypeInfo.java index c340fb0760d3..97f063d5a27b 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DataDiskStorageTypeInfo.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DataDiskStorageTypeInfo.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Storage information about the data disks present in the custom image. */ @Fluent public final class DataDiskStorageTypeInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataDiskStorageTypeInfo.class); - /* * Disk Lun */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DayDetails.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DayDetails.java index 7341b2a692ee..14230c989e1a 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DayDetails.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DayDetails.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a daily schedule. */ @Fluent public final class DayDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DayDetails.class); - /* * The time of day the schedule will occur. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DetachDataDiskProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DetachDataDiskProperties.java index 4a551226a759..803f44bf90e3 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DetachDataDiskProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DetachDataDiskProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Request body for detaching data disk from a virtual machine. */ @Fluent public final class DetachDataDiskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DetachDataDiskProperties.class); - /* * Specifies the disk resource ID to detach from virtual machine. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DetachDiskProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DetachDiskProperties.java index 05dcfa0a487b..7b7513245d28 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DetachDiskProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DetachDiskProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of the disk to detach. */ @Fluent public final class DetachDiskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DetachDiskProperties.class); - /* * The resource ID of the Lab VM to which the disk is attached. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DiskFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DiskFragment.java index e3e0362be522..f17fcf81f0e1 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DiskFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DiskFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** A Disk. */ -@Immutable +@Fluent public final class DiskFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskFragment.class); - /** {@inheritDoc} */ @Override public DiskFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DiskList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DiskList.java index 973192a12bcb..0d74f3d26308 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DiskList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DiskList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.DiskInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class DiskList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Disks.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Disks.java index b9ae9f616e0e..847dfccf9cdc 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Disks.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Disks.java @@ -19,7 +19,7 @@ public interface Disks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName, String username); @@ -37,7 +37,7 @@ public interface Disks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -75,7 +75,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk. + * @return disk along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String username, String name, String expand, Context context); @@ -196,7 +196,7 @@ void detach( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk. + * @return disk along with {@link Response}. */ Disk getById(String id); @@ -209,7 +209,7 @@ void detach( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk. + * @return disk along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DtlEnvironmentFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DtlEnvironmentFragment.java index a7a1654b7145..24a244f10578 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DtlEnvironmentFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DtlEnvironmentFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** An environment, which is essentially an ARM template deployment. */ -@Immutable +@Fluent public final class DtlEnvironmentFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DtlEnvironmentFragment.class); - /** {@inheritDoc} */ @Override public DtlEnvironmentFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DtlEnvironmentList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DtlEnvironmentList.java index e1bda4c63c84..a3cb3b4dd660 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DtlEnvironmentList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DtlEnvironmentList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.DtlEnvironmentInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class DtlEnvironmentList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DtlEnvironmentList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/EnvironmentDeploymentProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/EnvironmentDeploymentProperties.java index 135c2dcbec13..4a9e73031764 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/EnvironmentDeploymentProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/EnvironmentDeploymentProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of an environment deployment. */ @Fluent public final class EnvironmentDeploymentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentDeploymentProperties.class); - /* * The Azure Resource Manager template's identifier. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Environments.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Environments.java index 8ce166a90356..01f30fe55389 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Environments.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Environments.java @@ -19,7 +19,7 @@ public interface Environments { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName, String username); @@ -37,7 +37,7 @@ public interface Environments { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -75,7 +75,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment. + * @return environment along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String username, String name, String expand, Context context); @@ -114,7 +114,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment. + * @return environment along with {@link Response}. */ DtlEnvironment getById(String id); @@ -127,7 +127,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment. + * @return environment along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/EvaluatePoliciesProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/EvaluatePoliciesProperties.java index f2162bb3b559..6efce2471328 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/EvaluatePoliciesProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/EvaluatePoliciesProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties for evaluating a policy set. */ @Fluent public final class EvaluatePoliciesProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EvaluatePoliciesProperties.class); - /* * The fact name. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/EvaluatePoliciesRequest.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/EvaluatePoliciesRequest.java index 90cbc39b24af..55d60e79ea67 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/EvaluatePoliciesRequest.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/EvaluatePoliciesRequest.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Request body for evaluating a policy set. */ @Fluent public final class EvaluatePoliciesRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EvaluatePoliciesRequest.class); - /* * Policies to evaluate. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Event.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Event.java index 6d413ea89e10..8f4f885dd484 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Event.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Event.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** An event to be notified for. */ @Fluent public final class Event { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Event.class); - /* * The event type for which this notification is enabled (i.e. * AutoShutdown, Cost) diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ExportResourceUsageParameters.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ExportResourceUsageParameters.java index d0c49961363e..917d3532e588 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ExportResourceUsageParameters.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ExportResourceUsageParameters.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The parameters of the export operation. */ @Fluent public final class ExportResourceUsageParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExportResourceUsageParameters.class); - /* * The blob storage absolute sas uri with write permission to the container * which the usage data needs to be uploaded to. diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ExternalSubnet.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ExternalSubnet.java index e00d9b37e999..0b53c8b5913e 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ExternalSubnet.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ExternalSubnet.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Subnet information as returned by the Microsoft.Network API. */ @Fluent public final class ExternalSubnet { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExternalSubnet.class); - /* * Gets or sets the identifier. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/FormulaFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/FormulaFragment.java index c55a002df1bf..b7a272e6fdf4 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/FormulaFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/FormulaFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** A formula for creating a VM, specifying an image base and other parameters. */ -@Immutable +@Fluent public final class FormulaFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FormulaFragment.class); - /** {@inheritDoc} */ @Override public FormulaFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/FormulaList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/FormulaList.java index 8533445239a8..8022dab15143 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/FormulaList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/FormulaList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.FormulaInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class FormulaList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FormulaList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/FormulaPropertiesFromVm.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/FormulaPropertiesFromVm.java index fbfbd886fffa..321173d2afdd 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/FormulaPropertiesFromVm.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/FormulaPropertiesFromVm.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Information about a VM from which a formula is to be created. */ @Fluent public final class FormulaPropertiesFromVm { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FormulaPropertiesFromVm.class); - /* * The identifier of the VM from which a formula is to be created. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Formulas.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Formulas.java index 420a159e91e4..8f657d9304ce 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Formulas.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Formulas.java @@ -18,7 +18,7 @@ public interface Formulas { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName); @@ -35,7 +35,7 @@ public interface Formulas { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -70,7 +70,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return formula. + * @return formula along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String name, String expand, Context context); @@ -97,7 +97,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context); @@ -108,7 +108,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return formula. + * @return formula along with {@link Response}. */ Formula getById(String id); @@ -121,7 +121,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return formula. + * @return formula along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); @@ -143,7 +143,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GalleryImageList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GalleryImageList.java index 81f9d164936f..969c2dba0b72 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GalleryImageList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GalleryImageList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.GalleryImageInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class GalleryImageList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GalleryImageList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GalleryImageReference.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GalleryImageReference.java index 943ffff5513d..2e861d19e14f 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GalleryImageReference.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GalleryImageReference.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The reference information for an Azure Marketplace image. */ @Fluent public final class GalleryImageReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GalleryImageReference.class); - /* * The offer of the gallery image. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GalleryImages.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GalleryImages.java index 9f1af15099d2..f31109922f98 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GalleryImages.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GalleryImages.java @@ -17,7 +17,7 @@ public interface GalleryImages { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName); @@ -34,7 +34,7 @@ public interface GalleryImages { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GenerateArmTemplateRequest.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GenerateArmTemplateRequest.java index 2ebf6f659b58..51dae85d1c3c 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GenerateArmTemplateRequest.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GenerateArmTemplateRequest.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Parameters for generating an ARM template for deploying artifacts. */ @Fluent public final class GenerateArmTemplateRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GenerateArmTemplateRequest.class); - /* * The resource name of the virtual machine. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GenerateUploadUriParameter.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GenerateUploadUriParameter.java index ae08ae55a042..42c829b94cc4 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GenerateUploadUriParameter.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GenerateUploadUriParameter.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties for generating an upload URI. */ @Fluent public final class GenerateUploadUriParameter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GenerateUploadUriParameter.class); - /* * The blob name of the upload URI. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GlobalSchedules.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GlobalSchedules.java index ab62d09cc507..18abab7402e3 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GlobalSchedules.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/GlobalSchedules.java @@ -15,7 +15,7 @@ public interface GlobalSchedules { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -30,7 +30,7 @@ public interface GlobalSchedules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String expand, String filter, Integer top, String orderby, Context context); @@ -41,7 +41,7 @@ public interface GlobalSchedules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -57,7 +57,7 @@ public interface GlobalSchedules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup( String resourceGroupName, String expand, String filter, Integer top, String orderby, Context context); @@ -84,7 +84,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String name, String expand, Context context); @@ -109,7 +109,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String name, Context context); @@ -169,7 +169,7 @@ void retarget( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ Schedule getById(String id); @@ -182,7 +182,7 @@ void retarget( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); @@ -204,7 +204,7 @@ void retarget( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/HourDetails.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/HourDetails.java index 3a9be05ac25d..4371618e3750 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/HourDetails.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/HourDetails.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of an hourly schedule. */ @Fluent public final class HourDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HourDetails.class); - /* * Minutes of the hour the schedule will run. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/IdentityProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/IdentityProperties.java index cb32d4fa467e..af71a04871b6 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/IdentityProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/IdentityProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a managed identity. */ @Fluent public final class IdentityProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IdentityProperties.class); - /* * Managed identity. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ImportLabVirtualMachineRequest.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ImportLabVirtualMachineRequest.java index 14ccbae1c578..e217fa7dc8e0 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ImportLabVirtualMachineRequest.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ImportLabVirtualMachineRequest.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** This represents the payload required to import a virtual machine from a different lab into the current one. */ @Fluent public final class ImportLabVirtualMachineRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImportLabVirtualMachineRequest.class); - /* * The full resource ID of the virtual machine to be imported. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/InboundNatRule.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/InboundNatRule.java index aaaee9515f5c..fe228e0ac88d 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/InboundNatRule.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/InboundNatRule.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A rule for NAT - exposing a VM's port (backendPort) on the public IP address using a load balancer. */ @Fluent public final class InboundNatRule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InboundNatRule.class); - /* * The transport protocol for the endpoint. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Lab.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Lab.java index 9603a37c9da8..64564e91bb10 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Lab.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Lab.java @@ -523,7 +523,7 @@ interface WithTags { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response body for generating an upload URI. + * @return response body for generating an upload URI along with {@link Response}. */ Response generateUploadUriWithResponse( GenerateUploadUriParameter generateUploadUriParameter, Context context); @@ -556,7 +556,7 @@ Response generateUploadUriWithResponse( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listVhds(); @@ -567,7 +567,7 @@ Response generateUploadUriWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listVhds(Context context); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabAnnouncementProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabAnnouncementProperties.java index 38dc91b4a67f..af6e25504c7d 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabAnnouncementProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabAnnouncementProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Properties of a lab's announcement banner. */ @Fluent public final class LabAnnouncementProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabAnnouncementProperties.class); - /* * The plain text title for the lab announcement */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabCostDetailsProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabCostDetailsProperties.java index 639e93725bea..d5e73b313517 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabCostDetailsProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabCostDetailsProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The properties of a lab cost item. */ @Fluent public final class LabCostDetailsProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabCostDetailsProperties.class); - /* * The date of the cost item. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabCostSummaryProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabCostSummaryProperties.java index d9db34eebd68..5984a44479f6 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabCostSummaryProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabCostSummaryProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of the cost summary. */ @Fluent public final class LabCostSummaryProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabCostSummaryProperties.class); - /* * The cost component of the cost item. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabFragment.java index 18296f1d5f5f..8985d4f540ba 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** A lab. */ -@Immutable +@Fluent public final class LabFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabFragment.class); - /** {@inheritDoc} */ @Override public LabFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabList.java index be5a252f099d..cd7a7ce7d0ec 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.LabInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class LabList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabResourceCostProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabResourceCostProperties.java index 433d7ccfcd7f..63f3af1321df 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabResourceCostProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabResourceCostProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of a resource cost item. */ @Fluent public final class LabResourceCostProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabResourceCostProperties.class); - /* * The name of the resource. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabSupportProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabSupportProperties.java index e22bb44b49cf..c4c3edf69333 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabSupportProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabSupportProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a lab's support banner. */ @Fluent public final class LabSupportProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabSupportProperties.class); - /* * Is the lab support banner active/enabled at this time? */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVhdList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVhdList.java index c56180269280..386ec73a5869 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVhdList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVhdList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.LabVhdInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class LabVhdList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabVhdList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachine.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachine.java index b98618489a9f..2dfc2644e029 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachine.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachine.java @@ -801,7 +801,8 @@ interface WithTags { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a string that represents the contents of the RDP file for the virtual machine. + * @return a string that represents the contents of the RDP file for the virtual machine along with {@link + * Response}. */ Response getRdpFileContentsWithResponse(Context context); @@ -821,7 +822,7 @@ interface WithTags { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine along with {@link Response}. */ Response listApplicableSchedulesWithResponse(Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineCreationParameter.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineCreationParameter.java index d4954b1acd96..1a3e2bf488c5 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineCreationParameter.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineCreationParameter.java @@ -5,19 +5,21 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.devtestlabs.fluent.models.LabVirtualMachineCreationParameterProperties; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** Properties for creating a virtual machine. */ -@JsonFlatten @Fluent -public class LabVirtualMachineCreationParameter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabVirtualMachineCreationParameter.class); +public final class LabVirtualMachineCreationParameter { + /* + * The properties of the resource. + */ + @JsonProperty(value = "properties") + private LabVirtualMachineCreationParameterProperties innerProperties; /* * The name of the virtual machine or environment @@ -35,155 +37,17 @@ public class LabVirtualMachineCreationParameter { * The tags of the resource. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /* - * The number of virtual machine instances to create. - */ - @JsonProperty(value = "properties.bulkCreationParameters") - private BulkCreationParameters bulkCreationParameters; - - /* - * The notes of the virtual machine. - */ - @JsonProperty(value = "properties.notes") - private String notes; - - /* - * The object identifier of the owner of the virtual machine. - */ - @JsonProperty(value = "properties.ownerObjectId") - private String ownerObjectId; - - /* - * The user principal name of the virtual machine owner. - */ - @JsonProperty(value = "properties.ownerUserPrincipalName") - private String ownerUserPrincipalName; - - /* - * The creation date of the virtual machine. - */ - @JsonProperty(value = "properties.createdDate") - private OffsetDateTime createdDate; - - /* - * The custom image identifier of the virtual machine. - */ - @JsonProperty(value = "properties.customImageId") - private String customImageId; - - /* - * The size of the virtual machine. - */ - @JsonProperty(value = "properties.size") - private String size; - - /* - * The user name of the virtual machine. - */ - @JsonProperty(value = "properties.userName") - private String username; - - /* - * The password of the virtual machine administrator. - */ - @JsonProperty(value = "properties.password") - private String password; - - /* - * The SSH key of the virtual machine administrator. - */ - @JsonProperty(value = "properties.sshKey") - private String sshKey; - - /* - * Indicates whether this virtual machine uses an SSH key for - * authentication. - */ - @JsonProperty(value = "properties.isAuthenticationWithSshKey") - private Boolean isAuthenticationWithSshKey; - - /* - * The lab subnet name of the virtual machine. - */ - @JsonProperty(value = "properties.labSubnetName") - private String labSubnetName; - - /* - * The lab virtual network identifier of the virtual machine. - */ - @JsonProperty(value = "properties.labVirtualNetworkId") - private String labVirtualNetworkId; - - /* - * Indicates whether the virtual machine is to be created without a public - * IP address. - */ - @JsonProperty(value = "properties.disallowPublicIpAddress") - private Boolean disallowPublicIpAddress; - - /* - * The artifacts to be installed on the virtual machine. - */ - @JsonProperty(value = "properties.artifacts") - private List artifacts; - - /* - * The Microsoft Azure Marketplace image reference of the virtual machine. - */ - @JsonProperty(value = "properties.galleryImageReference") - private GalleryImageReference galleryImageReference; - - /* - * The id of the plan associated with the virtual machine image - */ - @JsonProperty(value = "properties.planId") - private String planId; - - /* - * The network interface properties. - */ - @JsonProperty(value = "properties.networkInterface") - private NetworkInterfaceProperties networkInterface; - - /* - * The expiration date for VM. - */ - @JsonProperty(value = "properties.expirationDate") - private OffsetDateTime expirationDate; - - /* - * Indicates whether another user can take ownership of the virtual machine - */ - @JsonProperty(value = "properties.allowClaim") - private Boolean allowClaim; - - /* - * Storage type to use for virtual machine (i.e. Standard, Premium). - */ - @JsonProperty(value = "properties.storageType") - private String storageType; - - /* - * The resource ID of the environment that contains this virtual machine, - * if any. - */ - @JsonProperty(value = "properties.environmentId") - private String environmentId; - - /* - * New or existing data disks to attach to the virtual machine after - * creation - */ - @JsonProperty(value = "properties.dataDiskParameters") - private List dataDiskParameters; - - /* - * Virtual Machine schedules to be created + /** + * Get the innerProperties property: The properties of the resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.scheduleParameters") - private List scheduleParameters; + private LabVirtualMachineCreationParameterProperties innerProperties() { + return this.innerProperties; + } /** * Get the name property: The name of the virtual machine or environment. @@ -251,7 +115,7 @@ public LabVirtualMachineCreationParameter withTags(Map tags) { * @return the bulkCreationParameters value. */ public BulkCreationParameters bulkCreationParameters() { - return this.bulkCreationParameters; + return this.innerProperties() == null ? null : this.innerProperties().bulkCreationParameters(); } /** @@ -262,7 +126,10 @@ public BulkCreationParameters bulkCreationParameters() { */ public LabVirtualMachineCreationParameter withBulkCreationParameters( BulkCreationParameters bulkCreationParameters) { - this.bulkCreationParameters = bulkCreationParameters; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withBulkCreationParameters(bulkCreationParameters); return this; } @@ -272,7 +139,7 @@ public LabVirtualMachineCreationParameter withBulkCreationParameters( * @return the notes value. */ public String notes() { - return this.notes; + return this.innerProperties() == null ? null : this.innerProperties().notes(); } /** @@ -282,7 +149,10 @@ public String notes() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withNotes(String notes) { - this.notes = notes; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withNotes(notes); return this; } @@ -292,7 +162,7 @@ public LabVirtualMachineCreationParameter withNotes(String notes) { * @return the ownerObjectId value. */ public String ownerObjectId() { - return this.ownerObjectId; + return this.innerProperties() == null ? null : this.innerProperties().ownerObjectId(); } /** @@ -302,7 +172,10 @@ public String ownerObjectId() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withOwnerObjectId(String ownerObjectId) { - this.ownerObjectId = ownerObjectId; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withOwnerObjectId(ownerObjectId); return this; } @@ -312,7 +185,7 @@ public LabVirtualMachineCreationParameter withOwnerObjectId(String ownerObjectId * @return the ownerUserPrincipalName value. */ public String ownerUserPrincipalName() { - return this.ownerUserPrincipalName; + return this.innerProperties() == null ? null : this.innerProperties().ownerUserPrincipalName(); } /** @@ -322,7 +195,10 @@ public String ownerUserPrincipalName() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withOwnerUserPrincipalName(String ownerUserPrincipalName) { - this.ownerUserPrincipalName = ownerUserPrincipalName; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withOwnerUserPrincipalName(ownerUserPrincipalName); return this; } @@ -332,7 +208,7 @@ public LabVirtualMachineCreationParameter withOwnerUserPrincipalName(String owne * @return the createdDate value. */ public OffsetDateTime createdDate() { - return this.createdDate; + return this.innerProperties() == null ? null : this.innerProperties().createdDate(); } /** @@ -342,7 +218,10 @@ public OffsetDateTime createdDate() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withCreatedDate(OffsetDateTime createdDate) { - this.createdDate = createdDate; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withCreatedDate(createdDate); return this; } @@ -352,7 +231,7 @@ public LabVirtualMachineCreationParameter withCreatedDate(OffsetDateTime created * @return the customImageId value. */ public String customImageId() { - return this.customImageId; + return this.innerProperties() == null ? null : this.innerProperties().customImageId(); } /** @@ -362,7 +241,10 @@ public String customImageId() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withCustomImageId(String customImageId) { - this.customImageId = customImageId; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withCustomImageId(customImageId); return this; } @@ -372,7 +254,7 @@ public LabVirtualMachineCreationParameter withCustomImageId(String customImageId * @return the size value. */ public String size() { - return this.size; + return this.innerProperties() == null ? null : this.innerProperties().size(); } /** @@ -382,7 +264,10 @@ public String size() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withSize(String size) { - this.size = size; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withSize(size); return this; } @@ -392,7 +277,7 @@ public LabVirtualMachineCreationParameter withSize(String size) { * @return the username value. */ public String username() { - return this.username; + return this.innerProperties() == null ? null : this.innerProperties().username(); } /** @@ -402,7 +287,10 @@ public String username() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withUsername(String username) { - this.username = username; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withUsername(username); return this; } @@ -412,7 +300,7 @@ public LabVirtualMachineCreationParameter withUsername(String username) { * @return the password value. */ public String password() { - return this.password; + return this.innerProperties() == null ? null : this.innerProperties().password(); } /** @@ -422,7 +310,10 @@ public String password() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withPassword(String password) { - this.password = password; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withPassword(password); return this; } @@ -432,7 +323,7 @@ public LabVirtualMachineCreationParameter withPassword(String password) { * @return the sshKey value. */ public String sshKey() { - return this.sshKey; + return this.innerProperties() == null ? null : this.innerProperties().sshKey(); } /** @@ -442,7 +333,10 @@ public String sshKey() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withSshKey(String sshKey) { - this.sshKey = sshKey; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withSshKey(sshKey); return this; } @@ -453,7 +347,7 @@ public LabVirtualMachineCreationParameter withSshKey(String sshKey) { * @return the isAuthenticationWithSshKey value. */ public Boolean isAuthenticationWithSshKey() { - return this.isAuthenticationWithSshKey; + return this.innerProperties() == null ? null : this.innerProperties().isAuthenticationWithSshKey(); } /** @@ -464,7 +358,10 @@ public Boolean isAuthenticationWithSshKey() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withIsAuthenticationWithSshKey(Boolean isAuthenticationWithSshKey) { - this.isAuthenticationWithSshKey = isAuthenticationWithSshKey; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withIsAuthenticationWithSshKey(isAuthenticationWithSshKey); return this; } @@ -474,7 +371,7 @@ public LabVirtualMachineCreationParameter withIsAuthenticationWithSshKey(Boolean * @return the labSubnetName value. */ public String labSubnetName() { - return this.labSubnetName; + return this.innerProperties() == null ? null : this.innerProperties().labSubnetName(); } /** @@ -484,7 +381,10 @@ public String labSubnetName() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withLabSubnetName(String labSubnetName) { - this.labSubnetName = labSubnetName; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withLabSubnetName(labSubnetName); return this; } @@ -494,7 +394,7 @@ public LabVirtualMachineCreationParameter withLabSubnetName(String labSubnetName * @return the labVirtualNetworkId value. */ public String labVirtualNetworkId() { - return this.labVirtualNetworkId; + return this.innerProperties() == null ? null : this.innerProperties().labVirtualNetworkId(); } /** @@ -504,7 +404,10 @@ public String labVirtualNetworkId() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withLabVirtualNetworkId(String labVirtualNetworkId) { - this.labVirtualNetworkId = labVirtualNetworkId; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withLabVirtualNetworkId(labVirtualNetworkId); return this; } @@ -515,7 +418,7 @@ public LabVirtualMachineCreationParameter withLabVirtualNetworkId(String labVirt * @return the disallowPublicIpAddress value. */ public Boolean disallowPublicIpAddress() { - return this.disallowPublicIpAddress; + return this.innerProperties() == null ? null : this.innerProperties().disallowPublicIpAddress(); } /** @@ -526,7 +429,10 @@ public Boolean disallowPublicIpAddress() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withDisallowPublicIpAddress(Boolean disallowPublicIpAddress) { - this.disallowPublicIpAddress = disallowPublicIpAddress; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withDisallowPublicIpAddress(disallowPublicIpAddress); return this; } @@ -536,7 +442,7 @@ public LabVirtualMachineCreationParameter withDisallowPublicIpAddress(Boolean di * @return the artifacts value. */ public List artifacts() { - return this.artifacts; + return this.innerProperties() == null ? null : this.innerProperties().artifacts(); } /** @@ -546,7 +452,10 @@ public List artifacts() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withArtifacts(List artifacts) { - this.artifacts = artifacts; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withArtifacts(artifacts); return this; } @@ -556,7 +465,7 @@ public LabVirtualMachineCreationParameter withArtifacts(List dataDiskParameters() { - return this.dataDiskParameters; + return this.innerProperties() == null ? null : this.innerProperties().dataDiskParameters(); } /** @@ -706,7 +636,10 @@ public List dataDiskParameters() { * @return the LabVirtualMachineCreationParameter object itself. */ public LabVirtualMachineCreationParameter withDataDiskParameters(List dataDiskParameters) { - this.dataDiskParameters = dataDiskParameters; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withDataDiskParameters(dataDiskParameters); return this; } @@ -716,7 +649,7 @@ public LabVirtualMachineCreationParameter withDataDiskParameters(List scheduleParameters() { - return this.scheduleParameters; + return this.innerProperties() == null ? null : this.innerProperties().scheduleParameters(); } /** @@ -727,7 +660,10 @@ public List scheduleParameters() { */ public LabVirtualMachineCreationParameter withScheduleParameters( List scheduleParameters) { - this.scheduleParameters = scheduleParameters; + if (this.innerProperties() == null) { + this.innerProperties = new LabVirtualMachineCreationParameterProperties(); + } + this.innerProperties().withScheduleParameters(scheduleParameters); return this; } @@ -737,23 +673,8 @@ public LabVirtualMachineCreationParameter withScheduleParameters( * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (bulkCreationParameters() != null) { - bulkCreationParameters().validate(); - } - if (artifacts() != null) { - artifacts().forEach(e -> e.validate()); - } - if (galleryImageReference() != null) { - galleryImageReference().validate(); - } - if (networkInterface() != null) { - networkInterface().validate(); - } - if (dataDiskParameters() != null) { - dataDiskParameters().forEach(e -> e.validate()); - } - if (scheduleParameters() != null) { - scheduleParameters().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineFragment.java index 60feabce04c6..42530ff7220e 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** A virtual machine. */ -@Immutable +@Fluent public final class LabVirtualMachineFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabVirtualMachineFragment.class); - /** {@inheritDoc} */ @Override public LabVirtualMachineFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineList.java index 5ad1986eeb9d..8446d5230485 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.LabVirtualMachineInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class LabVirtualMachineList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabVirtualMachineList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineProperties.java new file mode 100644 index 000000000000..e433eee18330 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LabVirtualMachineProperties.java @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.models; + +import com.azure.resourcemanager.devtestlabs.fluent.models.LabVirtualMachinePropertiesInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** An immutable client-side representation of LabVirtualMachineProperties. */ +public interface LabVirtualMachineProperties { + /** + * Gets the notes property: The notes of the virtual machine. + * + * @return the notes value. + */ + String notes(); + + /** + * Gets the ownerObjectId property: The object identifier of the owner of the virtual machine. + * + * @return the ownerObjectId value. + */ + String ownerObjectId(); + + /** + * Gets the ownerUserPrincipalName property: The user principal name of the virtual machine owner. + * + * @return the ownerUserPrincipalName value. + */ + String ownerUserPrincipalName(); + + /** + * Gets the createdByUserId property: The object identifier of the creator of the virtual machine. + * + * @return the createdByUserId value. + */ + String createdByUserId(); + + /** + * Gets the createdByUser property: The email address of creator of the virtual machine. + * + * @return the createdByUser value. + */ + String createdByUser(); + + /** + * Gets the createdDate property: The creation date of the virtual machine. + * + * @return the createdDate value. + */ + OffsetDateTime createdDate(); + + /** + * Gets the computeId property: The resource identifier (Microsoft.Compute) of the virtual machine. + * + * @return the computeId value. + */ + String computeId(); + + /** + * Gets the customImageId property: The custom image identifier of the virtual machine. + * + * @return the customImageId value. + */ + String customImageId(); + + /** + * Gets the osType property: The OS type of the virtual machine. + * + * @return the osType value. + */ + String osType(); + + /** + * Gets the size property: The size of the virtual machine. + * + * @return the size value. + */ + String size(); + + /** + * Gets the username property: The user name of the virtual machine. + * + * @return the username value. + */ + String username(); + + /** + * Gets the password property: The password of the virtual machine administrator. + * + * @return the password value. + */ + String password(); + + /** + * Gets the sshKey property: The SSH key of the virtual machine administrator. + * + * @return the sshKey value. + */ + String sshKey(); + + /** + * Gets the isAuthenticationWithSshKey property: Indicates whether this virtual machine uses an SSH key for + * authentication. + * + * @return the isAuthenticationWithSshKey value. + */ + Boolean isAuthenticationWithSshKey(); + + /** + * Gets the fqdn property: The fully-qualified domain name of the virtual machine. + * + * @return the fqdn value. + */ + String fqdn(); + + /** + * Gets the labSubnetName property: The lab subnet name of the virtual machine. + * + * @return the labSubnetName value. + */ + String labSubnetName(); + + /** + * Gets the labVirtualNetworkId property: The lab virtual network identifier of the virtual machine. + * + * @return the labVirtualNetworkId value. + */ + String labVirtualNetworkId(); + + /** + * Gets the disallowPublicIpAddress property: Indicates whether the virtual machine is to be created without a + * public IP address. + * + * @return the disallowPublicIpAddress value. + */ + Boolean disallowPublicIpAddress(); + + /** + * Gets the artifacts property: The artifacts to be installed on the virtual machine. + * + * @return the artifacts value. + */ + List artifacts(); + + /** + * Gets the artifactDeploymentStatus property: The artifact deployment status for the virtual machine. + * + * @return the artifactDeploymentStatus value. + */ + ArtifactDeploymentStatusProperties artifactDeploymentStatus(); + + /** + * Gets the galleryImageReference property: The Microsoft Azure Marketplace image reference of the virtual machine. + * + * @return the galleryImageReference value. + */ + GalleryImageReference galleryImageReference(); + + /** + * Gets the planId property: The id of the plan associated with the virtual machine image. + * + * @return the planId value. + */ + String planId(); + + /** + * Gets the computeVm property: The compute virtual machine properties. + * + * @return the computeVm value. + */ + ComputeVmProperties computeVm(); + + /** + * Gets the networkInterface property: The network interface properties. + * + * @return the networkInterface value. + */ + NetworkInterfaceProperties networkInterface(); + + /** + * Gets the applicableSchedule property: The applicable schedule for the virtual machine. + * + * @return the applicableSchedule value. + */ + ApplicableSchedule applicableSchedule(); + + /** + * Gets the expirationDate property: The expiration date for VM. + * + * @return the expirationDate value. + */ + OffsetDateTime expirationDate(); + + /** + * Gets the allowClaim property: Indicates whether another user can take ownership of the virtual machine. + * + * @return the allowClaim value. + */ + Boolean allowClaim(); + + /** + * Gets the storageType property: Storage type to use for virtual machine (i.e. Standard, Premium). + * + * @return the storageType value. + */ + String storageType(); + + /** + * Gets the virtualMachineCreationSource property: Tells source of creation of lab virtual machine. Output property + * only. + * + * @return the virtualMachineCreationSource value. + */ + VirtualMachineCreationSource virtualMachineCreationSource(); + + /** + * Gets the environmentId property: The resource ID of the environment that contains this virtual machine, if any. + * + * @return the environmentId value. + */ + String environmentId(); + + /** + * Gets the dataDiskParameters property: New or existing data disks to attach to the virtual machine after creation. + * + * @return the dataDiskParameters value. + */ + List dataDiskParameters(); + + /** + * Gets the scheduleParameters property: Virtual Machine schedules to be created. + * + * @return the scheduleParameters value. + */ + List scheduleParameters(); + + /** + * Gets the lastKnownPowerState property: Last known compute power state captured in DTL. + * + * @return the lastKnownPowerState value. + */ + String lastKnownPowerState(); + + /** + * Gets the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + String uniqueIdentifier(); + + /** + * Gets the inner com.azure.resourcemanager.devtestlabs.fluent.models.LabVirtualMachinePropertiesInner object. + * + * @return the inner object. + */ + LabVirtualMachinePropertiesInner innerModel(); +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Labs.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Labs.java index 34261c9de4e8..77d5dc62b7a6 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Labs.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Labs.java @@ -15,7 +15,7 @@ public interface Labs { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -30,7 +30,7 @@ public interface Labs { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String expand, String filter, Integer top, String orderby, Context context); @@ -41,7 +41,7 @@ public interface Labs { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -57,7 +57,7 @@ public interface Labs { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup( String resourceGroupName, String expand, String filter, Integer top, String orderby, Context context); @@ -84,7 +84,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lab. + * @return lab along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String name, String expand, Context context); @@ -218,7 +218,7 @@ GenerateUploadUriResponse generateUploadUri( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response body for generating an upload URI. + * @return response body for generating an upload URI along with {@link Response}. */ Response generateUploadUriWithResponse( String resourceGroupName, String name, GenerateUploadUriParameter generateUploadUriParameter, Context context); @@ -263,7 +263,7 @@ void importVirtualMachine( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listVhds(String resourceGroupName, String name); @@ -276,7 +276,7 @@ void importVirtualMachine( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listVhds(String resourceGroupName, String name, Context context); @@ -287,7 +287,7 @@ void importVirtualMachine( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lab. + * @return lab along with {@link Response}. */ Lab getById(String id); @@ -300,7 +300,7 @@ void importVirtualMachine( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lab. + * @return lab along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LinuxOsInfo.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LinuxOsInfo.java index b0fdefb03534..12c1ea19eace 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LinuxOsInfo.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/LinuxOsInfo.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Information about a Linux OS. */ @Fluent public final class LinuxOsInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LinuxOsInfo.class); - /* * The state of the Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, * DeprovisionApplied). diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NetworkInterfaceProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NetworkInterfaceProperties.java index 98894826a3c0..bd2a3ed3f256 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NetworkInterfaceProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NetworkInterfaceProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a network interface. */ @Fluent public final class NetworkInterfaceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkInterfaceProperties.class); - /* * The resource ID of the virtual network. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannel.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannel.java index d50efd65dd96..5553668349a6 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannel.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannel.java @@ -330,7 +330,7 @@ interface WithTags { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response notifyWithResponse(NotifyParameters notifyParameters, Context context); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannelFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannelFragment.java index f95756995d12..ea33ad109874 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannelFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannelFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** A notification. */ -@Immutable +@Fluent public final class NotificationChannelFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NotificationChannelFragment.class); - /** {@inheritDoc} */ @Override public NotificationChannelFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannelList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannelList.java index 83b46fcd73d1..6192578c6cd5 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannelList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannelList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.NotificationChannelInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class NotificationChannelList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NotificationChannelList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannels.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannels.java index 60e368e43878..19e6b36bdfec 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannels.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationChannels.java @@ -18,7 +18,7 @@ public interface NotificationChannels { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName); @@ -35,7 +35,7 @@ public interface NotificationChannels { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -70,7 +70,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return notification channel. + * @return notification channel along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String name, String expand, Context context); @@ -97,7 +97,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context); @@ -125,7 +125,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response notifyWithResponse( String resourceGroupName, String labName, String name, NotifyParameters notifyParameters, Context context); @@ -137,7 +137,7 @@ Response notifyWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return notification channel. + * @return notification channel along with {@link Response}. */ NotificationChannel getById(String id); @@ -150,7 +150,7 @@ Response notifyWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return notification channel. + * @return notification channel along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); @@ -172,7 +172,7 @@ Response notifyWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationSettings.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationSettings.java index 18dded9cf6f6..2fece2ec7df7 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationSettings.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotificationSettings.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Notification settings for a schedule. */ @Fluent public final class NotificationSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NotificationSettings.class); - /* * If notifications are enabled for this schedule (i.e. Enabled, Disabled). */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotifyParameters.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotifyParameters.java index 20e6544caad5..f7210f7f0a60 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotifyParameters.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/NotifyParameters.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties for generating a Notification. */ @Fluent public final class NotifyParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NotifyParameters.class); - /* * The type of event (i.e. AutoShutdown, Cost) */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/OperationError.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/OperationError.java index 884d343f4ee6..29fd0b726e75 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/OperationError.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/OperationError.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Error details for the operation in case of a failure. */ @Fluent public final class OperationError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationError.class); - /* * The error code of the operation error. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/OperationMetadataDisplay.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/OperationMetadataDisplay.java index 14f2384dc435..a80f2885bd7b 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/OperationMetadataDisplay.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/OperationMetadataDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The object that describes the operations. */ @Fluent public final class OperationMetadataDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationMetadataDisplay.class); - /* * Friendly name of the resource provider */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Operations.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Operations.java index fb6620b923f7..dd5b2689f82c 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Operations.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Operations.java @@ -30,7 +30,7 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation. + * @return operation along with {@link Response}. */ Response getWithResponse(String locationName, String name, Context context); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ParameterInfo.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ParameterInfo.java index 49be37a38a74..e7fcf4ab8949 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ParameterInfo.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ParameterInfo.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Information about an artifact's parameter. */ @Fluent public final class ParameterInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ParameterInfo.class); - /* * The name of the artifact parameter. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ParametersValueFileInfo.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ParametersValueFileInfo.java index 5e468a8e3fb2..23d631719d79 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ParametersValueFileInfo.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ParametersValueFileInfo.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A file containing a set of parameter values for an ARM template. */ @Fluent public final class ParametersValueFileInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ParametersValueFileInfo.class); - /* * File name. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PercentageCostThresholdProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PercentageCostThresholdProperties.java index 706208c05507..f7a088d71b61 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PercentageCostThresholdProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PercentageCostThresholdProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a percentage cost threshold. */ @Fluent public final class PercentageCostThresholdProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PercentageCostThresholdProperties.class); - /* * The cost threshold value. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Policies.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Policies.java index 7f152836281d..2d5f267846e4 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Policies.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Policies.java @@ -19,7 +19,7 @@ public interface Policies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName, String policySetName); @@ -37,7 +37,7 @@ public interface Policies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -75,7 +75,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy. + * @return policy along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String policySetName, String name, String expand, Context context); @@ -104,7 +104,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String labName, String policySetName, String name, Context context); @@ -116,7 +116,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy. + * @return policy along with {@link Response}. */ Policy getById(String id); @@ -129,7 +129,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy. + * @return policy along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); @@ -151,7 +151,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicyFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicyFragment.java index 92b3b1f13b57..d946bd41ffbc 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicyFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicyFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** A Policy. */ -@Immutable +@Fluent public final class PolicyFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyFragment.class); - /** {@inheritDoc} */ @Override public PolicyFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicyList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicyList.java index 322f4cb081eb..1abe7a835c3a 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicyList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicyList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.PolicyInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class PolicyList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicySetResult.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicySetResult.java index a1e279f54b3a..048f15f1258b 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicySetResult.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicySetResult.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of a policy set evaluation. */ @Fluent public final class PolicySetResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicySetResult.class); - /* * A value indicating whether this policy set evaluation has discovered * violations. diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicySets.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicySets.java index 51b4e62b90f7..0cb19c31fe95 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicySets.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicySets.java @@ -35,7 +35,7 @@ EvaluatePoliciesResponse evaluatePolicies( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response body for evaluating a policy set. + * @return response body for evaluating a policy set along with {@link Response}. */ Response evaluatePoliciesWithResponse( String resourceGroupName, diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicyViolation.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicyViolation.java index c019bb40d437..8092a8447f4f 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicyViolation.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/PolicyViolation.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Policy violation. */ @Fluent public final class PolicyViolation { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyViolation.class); - /* * The code of the policy violation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Port.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Port.java index 50c21d139e0a..cc289f4f3cc8 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Port.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Port.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a network port. */ @Fluent public final class Port { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Port.class); - /* * Protocol type of the port. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ProviderOperationResult.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ProviderOperationResult.java index 7e20c5515d5e..98cff052feb4 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ProviderOperationResult.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ProviderOperationResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.OperationMetadataInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of the request to list REST API operations. */ @Fluent public final class ProviderOperationResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProviderOperationResult.class); - /* * List of operations supported by the resource provider. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ProviderOperations.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ProviderOperations.java index 309352292976..e2fb764addd9 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ProviderOperations.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ProviderOperations.java @@ -14,7 +14,7 @@ public interface ProviderOperations { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -25,7 +25,7 @@ public interface ProviderOperations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ResizeLabVirtualMachineProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ResizeLabVirtualMachineProperties.java index 160abf518c2a..36ef7c760483 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ResizeLabVirtualMachineProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ResizeLabVirtualMachineProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Request body for resizing a virtual machine. */ @Fluent public final class ResizeLabVirtualMachineProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResizeLabVirtualMachineProperties.class); - /* * Specifies the size of the virtual machine. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/RetargetScheduleProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/RetargetScheduleProperties.java index 1ae64a6eb84d..b59a3373f475 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/RetargetScheduleProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/RetargetScheduleProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties for retargeting a virtual machine schedule. */ @Fluent public final class RetargetScheduleProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RetargetScheduleProperties.class); - /* * The resource Id of the virtual machine on which the schedule operates */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ScheduleCreationParameter.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ScheduleCreationParameter.java index df984223e28b..c11a9ae6327f 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ScheduleCreationParameter.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ScheduleCreationParameter.java @@ -5,17 +5,19 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.devtestlabs.fluent.models.ScheduleCreationParameterProperties; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Properties for creating a schedule. */ -@JsonFlatten @Fluent -public class ScheduleCreationParameter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleCreationParameter.class); +public final class ScheduleCreationParameter { + /* + * The properties of the schedule. + */ + @JsonProperty(value = "properties") + private ScheduleCreationParameterProperties innerProperties; /* * The name of the virtual machine or environment @@ -26,65 +28,24 @@ public class ScheduleCreationParameter { /* * The location of the new virtual machine or environment */ - @JsonProperty(value = "location") + @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; /* * The tags of the resource. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /* - * The status of the schedule (i.e. Enabled, Disabled) - */ - @JsonProperty(value = "properties.status") - private EnableStatus status; - - /* - * The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). - */ - @JsonProperty(value = "properties.taskType") - private String taskType; - - /* - * If the schedule will occur only some days of the week, specify the - * weekly recurrence. - */ - @JsonProperty(value = "properties.weeklyRecurrence") - private WeekDetails weeklyRecurrence; - - /* - * If the schedule will occur once each day of the week, specify the daily - * recurrence. - */ - @JsonProperty(value = "properties.dailyRecurrence") - private DayDetails dailyRecurrence; - - /* - * If the schedule will occur multiple times a day, specify the hourly - * recurrence. - */ - @JsonProperty(value = "properties.hourlyRecurrence") - private HourDetails hourlyRecurrence; - - /* - * The time zone ID (e.g. Pacific Standard time). - */ - @JsonProperty(value = "properties.timeZoneId") - private String timeZoneId; - - /* - * Notification settings. - */ - @JsonProperty(value = "properties.notificationSettings") - private NotificationSettings notificationSettings; - - /* - * The resource ID to which the schedule belongs + /** + * Get the innerProperties property: The properties of the schedule. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.targetResourceId") - private String targetResourceId; + private ScheduleCreationParameterProperties innerProperties() { + return this.innerProperties; + } /** * Get the name property: The name of the virtual machine or environment. @@ -115,17 +76,6 @@ public String location() { return this.location; } - /** - * Set the location property: The location of the new virtual machine or environment. - * - * @param location the location value to set. - * @return the ScheduleCreationParameter object itself. - */ - public ScheduleCreationParameter withLocation(String location) { - this.location = location; - return this; - } - /** * Get the tags property: The tags of the resource. * @@ -152,7 +102,7 @@ public ScheduleCreationParameter withTags(Map tags) { * @return the status value. */ public EnableStatus status() { - return this.status; + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** @@ -162,7 +112,10 @@ public EnableStatus status() { * @return the ScheduleCreationParameter object itself. */ public ScheduleCreationParameter withStatus(EnableStatus status) { - this.status = status; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleCreationParameterProperties(); + } + this.innerProperties().withStatus(status); return this; } @@ -172,7 +125,7 @@ public ScheduleCreationParameter withStatus(EnableStatus status) { * @return the taskType value. */ public String taskType() { - return this.taskType; + return this.innerProperties() == null ? null : this.innerProperties().taskType(); } /** @@ -182,7 +135,10 @@ public String taskType() { * @return the ScheduleCreationParameter object itself. */ public ScheduleCreationParameter withTaskType(String taskType) { - this.taskType = taskType; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleCreationParameterProperties(); + } + this.innerProperties().withTaskType(taskType); return this; } @@ -193,7 +149,7 @@ public ScheduleCreationParameter withTaskType(String taskType) { * @return the weeklyRecurrence value. */ public WeekDetails weeklyRecurrence() { - return this.weeklyRecurrence; + return this.innerProperties() == null ? null : this.innerProperties().weeklyRecurrence(); } /** @@ -204,7 +160,10 @@ public WeekDetails weeklyRecurrence() { * @return the ScheduleCreationParameter object itself. */ public ScheduleCreationParameter withWeeklyRecurrence(WeekDetails weeklyRecurrence) { - this.weeklyRecurrence = weeklyRecurrence; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleCreationParameterProperties(); + } + this.innerProperties().withWeeklyRecurrence(weeklyRecurrence); return this; } @@ -215,7 +174,7 @@ public ScheduleCreationParameter withWeeklyRecurrence(WeekDetails weeklyRecurren * @return the dailyRecurrence value. */ public DayDetails dailyRecurrence() { - return this.dailyRecurrence; + return this.innerProperties() == null ? null : this.innerProperties().dailyRecurrence(); } /** @@ -226,7 +185,10 @@ public DayDetails dailyRecurrence() { * @return the ScheduleCreationParameter object itself. */ public ScheduleCreationParameter withDailyRecurrence(DayDetails dailyRecurrence) { - this.dailyRecurrence = dailyRecurrence; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleCreationParameterProperties(); + } + this.innerProperties().withDailyRecurrence(dailyRecurrence); return this; } @@ -237,7 +199,7 @@ public ScheduleCreationParameter withDailyRecurrence(DayDetails dailyRecurrence) * @return the hourlyRecurrence value. */ public HourDetails hourlyRecurrence() { - return this.hourlyRecurrence; + return this.innerProperties() == null ? null : this.innerProperties().hourlyRecurrence(); } /** @@ -248,7 +210,10 @@ public HourDetails hourlyRecurrence() { * @return the ScheduleCreationParameter object itself. */ public ScheduleCreationParameter withHourlyRecurrence(HourDetails hourlyRecurrence) { - this.hourlyRecurrence = hourlyRecurrence; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleCreationParameterProperties(); + } + this.innerProperties().withHourlyRecurrence(hourlyRecurrence); return this; } @@ -258,7 +223,7 @@ public ScheduleCreationParameter withHourlyRecurrence(HourDetails hourlyRecurren * @return the timeZoneId value. */ public String timeZoneId() { - return this.timeZoneId; + return this.innerProperties() == null ? null : this.innerProperties().timeZoneId(); } /** @@ -268,7 +233,10 @@ public String timeZoneId() { * @return the ScheduleCreationParameter object itself. */ public ScheduleCreationParameter withTimeZoneId(String timeZoneId) { - this.timeZoneId = timeZoneId; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleCreationParameterProperties(); + } + this.innerProperties().withTimeZoneId(timeZoneId); return this; } @@ -278,7 +246,7 @@ public ScheduleCreationParameter withTimeZoneId(String timeZoneId) { * @return the notificationSettings value. */ public NotificationSettings notificationSettings() { - return this.notificationSettings; + return this.innerProperties() == null ? null : this.innerProperties().notificationSettings(); } /** @@ -288,7 +256,10 @@ public NotificationSettings notificationSettings() { * @return the ScheduleCreationParameter object itself. */ public ScheduleCreationParameter withNotificationSettings(NotificationSettings notificationSettings) { - this.notificationSettings = notificationSettings; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleCreationParameterProperties(); + } + this.innerProperties().withNotificationSettings(notificationSettings); return this; } @@ -298,7 +269,7 @@ public ScheduleCreationParameter withNotificationSettings(NotificationSettings n * @return the targetResourceId value. */ public String targetResourceId() { - return this.targetResourceId; + return this.innerProperties() == null ? null : this.innerProperties().targetResourceId(); } /** @@ -308,7 +279,10 @@ public String targetResourceId() { * @return the ScheduleCreationParameter object itself. */ public ScheduleCreationParameter withTargetResourceId(String targetResourceId) { - this.targetResourceId = targetResourceId; + if (this.innerProperties() == null) { + this.innerProperties = new ScheduleCreationParameterProperties(); + } + this.innerProperties().withTargetResourceId(targetResourceId); return this; } @@ -318,17 +292,8 @@ public ScheduleCreationParameter withTargetResourceId(String targetResourceId) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (weeklyRecurrence() != null) { - weeklyRecurrence().validate(); - } - if (dailyRecurrence() != null) { - dailyRecurrence().validate(); - } - if (hourlyRecurrence() != null) { - hourlyRecurrence().validate(); - } - if (notificationSettings() != null) { - notificationSettings().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ScheduleFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ScheduleFragment.java index 6b6cab823f1c..f4936f9b4859 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ScheduleFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ScheduleFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** A schedule. */ -@Immutable +@Fluent public final class ScheduleFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleFragment.class); - /** {@inheritDoc} */ @Override public ScheduleFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ScheduleList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ScheduleList.java index d0ac150bb546..dac51bde2e69 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ScheduleList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ScheduleList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.ScheduleInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class ScheduleList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Schedules.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Schedules.java index 0106062e12c6..e196d5aec6cb 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Schedules.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Schedules.java @@ -19,7 +19,7 @@ public interface Schedules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName); @@ -36,7 +36,7 @@ public interface Schedules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -71,7 +71,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String name, String expand, Context context); @@ -101,7 +101,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ Response createOrUpdateWithResponse( String resourceGroupName, String labName, String name, ScheduleInner schedule, Context context); @@ -128,7 +128,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context); @@ -157,7 +157,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ Response updateWithResponse( String resourceGroupName, String labName, String name, ScheduleFragment schedule, Context context); @@ -196,7 +196,7 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listApplicable(String resourceGroupName, String labName, String name); @@ -210,7 +210,7 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listApplicable(String resourceGroupName, String labName, String name, Context context); } diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SecretFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SecretFragment.java index 979efbf3b2ad..0fb9b72b8edd 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SecretFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SecretFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** A secret. */ -@Immutable +@Fluent public final class SecretFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecretFragment.class); - /** {@inheritDoc} */ @Override public SecretFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SecretList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SecretList.java index 4bd6052f8032..99fd6a4edc2b 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SecretList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SecretList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.SecretInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class SecretList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecretList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Secrets.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Secrets.java index 95983b15e491..3fc85f405457 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Secrets.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Secrets.java @@ -19,7 +19,7 @@ public interface Secrets { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName, String username); @@ -37,7 +37,7 @@ public interface Secrets { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -75,7 +75,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secret. + * @return secret along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String username, String name, String expand, Context context); @@ -104,7 +104,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String labName, String username, String name, Context context); @@ -116,7 +116,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secret. + * @return secret along with {@link Response}. */ Secret getById(String id); @@ -129,7 +129,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secret. + * @return secret along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); @@ -151,7 +151,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabric.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabric.java index 52867db8817e..31752a07f49f 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabric.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabric.java @@ -270,7 +270,7 @@ interface WithTags { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine along with {@link Response}. */ Response listApplicableSchedulesWithResponse(Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricFragment.java index 62f21e5a80ac..79866843b392 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** A Service Fabric. */ -@Immutable +@Fluent public final class ServiceFabricFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceFabricFragment.class); - /** {@inheritDoc} */ @Override public ServiceFabricFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricList.java index 87703cf4c31d..e05503869827 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.ServiceFabricInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class ServiceFabricList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceFabricList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricProperties.java new file mode 100644 index 000000000000..bf5c70a0b720 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricProperties.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.models; + +import com.azure.resourcemanager.devtestlabs.fluent.models.ServiceFabricPropertiesInner; + +/** An immutable client-side representation of ServiceFabricProperties. */ +public interface ServiceFabricProperties { + /** + * Gets the externalServiceFabricId property: The backing service fabric resource's id. + * + * @return the externalServiceFabricId value. + */ + String externalServiceFabricId(); + + /** + * Gets the environmentId property: The resource id of the environment under which the service fabric resource is + * present. + * + * @return the environmentId value. + */ + String environmentId(); + + /** + * Gets the applicableSchedule property: The applicable schedule for the virtual machine. + * + * @return the applicableSchedule value. + */ + ApplicableSchedule applicableSchedule(); + + /** + * Gets the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the uniqueIdentifier property: The unique immutable identifier of a resource (Guid). + * + * @return the uniqueIdentifier value. + */ + String uniqueIdentifier(); + + /** + * Gets the inner com.azure.resourcemanager.devtestlabs.fluent.models.ServiceFabricPropertiesInner object. + * + * @return the inner object. + */ + ServiceFabricPropertiesInner innerModel(); +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricSchedules.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricSchedules.java index ce7640d86d44..89fe234b2824 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricSchedules.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabricSchedules.java @@ -21,7 +21,7 @@ public interface ServiceFabricSchedules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName, String username, String serviceFabricName); @@ -40,7 +40,7 @@ public interface ServiceFabricSchedules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -81,7 +81,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ Response getWithResponse( String resourceGroupName, @@ -127,7 +127,7 @@ Schedule createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ Response createOrUpdateWithResponse( String resourceGroupName, @@ -164,7 +164,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, @@ -209,7 +209,7 @@ Schedule update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ Response updateWithResponse( String resourceGroupName, diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabrics.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabrics.java index d2dd3d08907b..130d5ed8e2f7 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabrics.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceFabrics.java @@ -19,7 +19,7 @@ public interface ServiceFabrics { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName, String username); @@ -37,7 +37,7 @@ public interface ServiceFabrics { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -75,7 +75,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service fabric. + * @return service fabric along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String username, String name, String expand, Context context); @@ -132,7 +132,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine along with {@link Response}. */ Response listApplicableSchedulesWithResponse( String resourceGroupName, String labName, String username, String name, Context context); @@ -198,7 +198,7 @@ Response listApplicableSchedulesWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service fabric. + * @return service fabric along with {@link Response}. */ ServiceFabric getById(String id); @@ -211,7 +211,7 @@ Response listApplicableSchedulesWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service fabric. + * @return service fabric along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceRunners.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceRunners.java index 03fc9e24f09b..c4f7f17d9aa9 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceRunners.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/ServiceRunners.java @@ -32,7 +32,7 @@ public interface ServiceRunners { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service runner. + * @return service runner along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String labName, String name, Context context); @@ -58,7 +58,7 @@ public interface ServiceRunners { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context); @@ -69,7 +69,7 @@ public interface ServiceRunners { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service runner. + * @return service runner along with {@link Response}. */ ServiceRunner getById(String id); @@ -81,7 +81,7 @@ public interface ServiceRunners { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service runner. + * @return service runner along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -103,7 +103,7 @@ public interface ServiceRunners { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SharedPublicIpAddressConfiguration.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SharedPublicIpAddressConfiguration.java index 4214baa898c6..b1cb678ef08e 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SharedPublicIpAddressConfiguration.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SharedPublicIpAddressConfiguration.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of a virtual machine that determine how it is connected to a load balancer. */ @Fluent public final class SharedPublicIpAddressConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SharedPublicIpAddressConfiguration.class); - /* * The incoming NAT rules */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Subnet.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Subnet.java index cc4eeb54b82d..27065c27bdf1 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Subnet.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Subnet.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Subnet information. */ @Fluent public final class Subnet { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Subnet.class); - /* * The resource ID of the subnet. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SubnetOverride.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SubnetOverride.java index ca16fd91c0be..66cffcb0c074 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SubnetOverride.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SubnetOverride.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Property overrides on a subnet of a virtual network. */ @Fluent public final class SubnetOverride { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubnetOverride.class); - /* * The resource ID of the subnet. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SubnetSharedPublicIpAddressConfiguration.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SubnetSharedPublicIpAddressConfiguration.java index 55ac07024eb5..42c4640df583 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SubnetSharedPublicIpAddressConfiguration.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/SubnetSharedPublicIpAddressConfiguration.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Configuration for public IP address sharing. */ @Fluent public final class SubnetSharedPublicIpAddressConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubnetSharedPublicIpAddressConfiguration.class); - /* * Backend ports that virtual machines on this subnet are allowed to expose */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/TargetCostProperties.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/TargetCostProperties.java index 36b5422f83cd..9333e35232f2 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/TargetCostProperties.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/TargetCostProperties.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -14,8 +12,6 @@ /** Properties of a cost target. */ @Fluent public final class TargetCostProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TargetCostProperties.class); - /* * Target cost status */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UpdateResource.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UpdateResource.java index 610fd09c3948..c7e2d3688a88 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UpdateResource.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UpdateResource.java @@ -5,20 +5,18 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Represents an update resource. */ @Fluent public class UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateResource.class); - /* * The tags of the resource. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserFragment.java index e2b92acdcd07..0cdc2626d6cc 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** Profile of a lab user. */ -@Immutable +@Fluent public final class UserFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserFragment.class); - /** {@inheritDoc} */ @Override public UserFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserIdentity.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserIdentity.java index 34a4b9f8f2b6..4afba1f56fcd 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserIdentity.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserIdentity.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Identity attributes of a lab user. */ @Fluent public class UserIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserIdentity.class); - /* * Set to the principal name / UPN of the client JWT making the request. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserList.java index f605804172b3..5bb240955660 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.UserInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class UserList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserSecretStore.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserSecretStore.java index 5e1e609b65f6..9ad127902cd4 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserSecretStore.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/UserSecretStore.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a user's secret store. */ @Fluent public final class UserSecretStore { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserSecretStore.class); - /* * The URI of the user's Key vault. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Users.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Users.java index 4ed220c5034a..227e7f20219b 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Users.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/Users.java @@ -18,7 +18,7 @@ public interface Users { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName); @@ -35,7 +35,7 @@ public interface Users { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -70,7 +70,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user profile. + * @return user profile along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String name, String expand, Context context); @@ -107,7 +107,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user profile. + * @return user profile along with {@link Response}. */ User getById(String id); @@ -120,7 +120,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user profile. + * @return user profile along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualMachineSchedules.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualMachineSchedules.java index eca90c4d6233..60be74d80e1a 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualMachineSchedules.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualMachineSchedules.java @@ -20,7 +20,7 @@ public interface VirtualMachineSchedules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName, String virtualMachineName); @@ -38,7 +38,7 @@ public interface VirtualMachineSchedules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -76,7 +76,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. + * @return schedule along with {@link Response}. */ Response getWithResponse( String resourceGroupName, @@ -114,7 +114,7 @@ Schedule createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ Response createOrUpdateWithResponse( String resourceGroupName, @@ -148,7 +148,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String labName, String virtualMachineName, String name, Context context); @@ -181,7 +181,7 @@ Schedule update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a schedule. + * @return a schedule along with {@link Response}. */ Response updateWithResponse( String resourceGroupName, diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualMachines.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualMachines.java index 0d5d8797dd50..11008f764b9e 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualMachines.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualMachines.java @@ -18,7 +18,7 @@ public interface VirtualMachines { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName); @@ -36,7 +36,7 @@ public interface VirtualMachines { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -72,7 +72,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String name, String expand, Context context); @@ -244,7 +244,8 @@ void detachDataDisk( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a string that represents the contents of the RDP file for the virtual machine. + * @return a string that represents the contents of the RDP file for the virtual machine along with {@link + * Response}. */ Response getRdpFileContentsWithResponse( String resourceGroupName, String labName, String name, Context context); @@ -272,7 +273,7 @@ Response getRdpFileContentsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedules applicable to a virtual machine. + * @return schedules applicable to a virtual machine along with {@link Response}. */ Response listApplicableSchedulesWithResponse( String resourceGroupName, String labName, String name, Context context); @@ -472,7 +473,7 @@ void resize( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response}. */ LabVirtualMachine getById(String id); @@ -486,7 +487,7 @@ void resize( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualNetworkFragment.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualNetworkFragment.java index c428930a8331..366cd8e01e5a 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualNetworkFragment.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualNetworkFragment.java @@ -4,16 +4,12 @@ package com.azure.resourcemanager.devtestlabs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import java.util.Map; /** A virtual network. */ -@Immutable +@Fluent public final class VirtualNetworkFragment extends UpdateResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkFragment.class); - /** {@inheritDoc} */ @Override public VirtualNetworkFragment withTags(Map tags) { diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualNetworkList.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualNetworkList.java index c2ae99b6f30e..2b5cf974b76b 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualNetworkList.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualNetworkList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devtestlabs.fluent.models.VirtualNetworkInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response of a list operation. */ @Fluent public final class VirtualNetworkList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkList.class); - /* * Results of the list operation. */ diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualNetworks.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualNetworks.java index 454e0143f737..163844092cbc 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualNetworks.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/VirtualNetworks.java @@ -18,7 +18,7 @@ public interface VirtualNetworks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String labName); @@ -35,7 +35,7 @@ public interface VirtualNetworks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation. + * @return the response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -70,7 +70,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network. + * @return virtual network along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String labName, String name, String expand, Context context); @@ -107,7 +107,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network. + * @return virtual network along with {@link Response}. */ VirtualNetwork getById(String id); @@ -120,7 +120,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network. + * @return virtual network along with {@link Response}. */ Response getByIdWithResponse(String id, String expand, Context context); diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/WeekDetails.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/WeekDetails.java index 9f185eee2ec3..bae5014965ff 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/WeekDetails.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/WeekDetails.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of a weekly schedule. */ @Fluent public final class WeekDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WeekDetails.class); - /* * The days of the week for which the schedule is set (e.g. Sunday, Monday, * Tuesday, etc.). diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/WindowsOsInfo.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/WindowsOsInfo.java index 55fb6f4a1ce3..6c1bc3077eaa 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/WindowsOsInfo.java +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/WindowsOsInfo.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.devtestlabs.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Information about a Windows OS. */ @Fluent public final class WindowsOsInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WindowsOsInfo.class); - /* * The state of the Windows OS (i.e. NonSysprepped, SysprepRequested, * SysprepApplied). diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArmTemplatesGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArmTemplatesGetSamples.java new file mode 100644 index 000000000000..bd019adbc07d --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArmTemplatesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ArmTemplates Get. */ +public final class ArmTemplatesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArmTemplates_Get.json + */ + /** + * Sample code: ArmTemplates_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void armTemplatesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .armTemplates() + .getWithResponse( + "resourceGroupName", "{labName}", "{artifactSourceName}", "{armTemplateName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArmTemplatesListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArmTemplatesListSamples.java new file mode 100644 index 000000000000..79c4a5998f9b --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArmTemplatesListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ArmTemplates List. */ +public final class ArmTemplatesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArmTemplates_List.json + */ + /** + * Sample code: ArmTemplates_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void armTemplatesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .armTemplates() + .list("resourceGroupName", "{labName}", "{artifactSourceName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..21c0ba449b6e --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesCreateOrUpdateSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.resourcemanager.devtestlabs.models.EnableStatus; +import com.azure.resourcemanager.devtestlabs.models.SourceControlType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ArtifactSources CreateOrUpdate. */ +public final class ArtifactSourcesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_CreateOrUpdate.json + */ + /** + * Sample code: ArtifactSources_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactSourcesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .artifactSources() + .define("{artifactSourceName}") + .withRegion((String) null) + .withExistingLab("resourceGroupName", "{labName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withDisplayName("{displayName}") + .withUri("{artifactSourceUri}") + .withSourceType(SourceControlType.fromString("{VsoGit|GitHub|StorageAccount}")) + .withFolderPath("{folderPath}") + .withArmTemplateFolderPath("{armTemplateFolderPath}") + .withBranchRef("{branchRef}") + .withSecurityToken("{securityToken}") + .withStatus(EnableStatus.fromString("{Enabled|Disabled}")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesDeleteSamples.java new file mode 100644 index 000000000000..06f05beee76b --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ArtifactSources Delete. */ +public final class ArtifactSourcesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_Delete.json + */ + /** + * Sample code: ArtifactSources_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactSourcesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .artifactSources() + .deleteWithResponse("resourceGroupName", "{labName}", "{artifactSourceName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesGetSamples.java new file mode 100644 index 000000000000..dbbe4fea4768 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ArtifactSources Get. */ +public final class ArtifactSourcesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_Get.json + */ + /** + * Sample code: ArtifactSources_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactSourcesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .artifactSources() + .getWithResponse("resourceGroupName", "{labName}", "{artifactSourceName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesListSamples.java new file mode 100644 index 000000000000..5c376795bcbb --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ArtifactSources List. */ +public final class ArtifactSourcesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_List.json + */ + /** + * Sample code: ArtifactSources_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactSourcesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.artifactSources().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesUpdateSamples.java new file mode 100644 index 000000000000..af21fe052756 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactSourcesUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ArtifactSource; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ArtifactSources Update. */ +public final class ArtifactSourcesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_Update.json + */ + /** + * Sample code: ArtifactSources_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactSourcesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + ArtifactSource resource = + manager + .artifactSources() + .getWithResponse("resourceGroupName", "{labName}", "{artifactSourceName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactsGenerateArmTemplateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactsGenerateArmTemplateSamples.java new file mode 100644 index 000000000000..69528e342756 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactsGenerateArmTemplateSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.FileUploadOptions; +import com.azure.resourcemanager.devtestlabs.models.GenerateArmTemplateRequest; + +/** Samples for Artifacts GenerateArmTemplate. */ +public final class ArtifactsGenerateArmTemplateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Artifacts_GenerateArmTemplate.json + */ + /** + * Sample code: Artifacts_GenerateArmTemplate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactsGenerateArmTemplate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .artifacts() + .generateArmTemplateWithResponse( + "resourceGroupName", + "{labName}", + "{artifactSourceName}", + "{artifactName}", + new GenerateArmTemplateRequest() + .withVirtualMachineName("{vmName}") + .withLocation("{location}") + .withFileUploadOptions(FileUploadOptions.NONE), + Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactsGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactsGetSamples.java new file mode 100644 index 000000000000..cdf99a7a6998 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Artifacts Get. */ +public final class ArtifactsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Artifacts_Get.json + */ + /** + * Sample code: Artifacts_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .artifacts() + .getWithResponse( + "resourceGroupName", "{labName}", "{artifactSourceName}", "{artifactName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactsListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactsListSamples.java new file mode 100644 index 000000000000..6e76245ce505 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ArtifactsListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Artifacts List. */ +public final class ArtifactsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Artifacts_List.json + */ + /** + * Sample code: Artifacts_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void artifactsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .artifacts() + .list("resourceGroupName", "{labName}", "{artifactSourceName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CostsCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CostsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..ba26ab776e6b --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CostsCreateOrUpdateSamples.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.resourcemanager.devtestlabs.models.CostThresholdProperties; +import com.azure.resourcemanager.devtestlabs.models.CostThresholdStatus; +import com.azure.resourcemanager.devtestlabs.models.PercentageCostThresholdProperties; +import com.azure.resourcemanager.devtestlabs.models.ReportingCycleType; +import com.azure.resourcemanager.devtestlabs.models.TargetCostProperties; +import com.azure.resourcemanager.devtestlabs.models.TargetCostStatus; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** Samples for Costs CreateOrUpdate. */ +public final class CostsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Costs_CreateOrUpdate.json + */ + /** + * Sample code: Costs_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void costsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .costs() + .define("targetCost") + .withRegion((String) null) + .withExistingLab("resourceGroupName", "{labName}") + .withTargetCost( + new TargetCostProperties() + .withStatus(TargetCostStatus.ENABLED) + .withTarget(100) + .withCostThresholds( + Arrays + .asList( + new CostThresholdProperties() + .withThresholdId("00000000-0000-0000-0000-000000000001") + .withPercentageThreshold( + new PercentageCostThresholdProperties().withThresholdValue(25.0)) + .withDisplayOnChart(CostThresholdStatus.DISABLED) + .withSendNotificationWhenExceeded(CostThresholdStatus.DISABLED), + new CostThresholdProperties() + .withThresholdId("00000000-0000-0000-0000-000000000002") + .withPercentageThreshold( + new PercentageCostThresholdProperties().withThresholdValue(50.0)) + .withDisplayOnChart(CostThresholdStatus.ENABLED) + .withSendNotificationWhenExceeded(CostThresholdStatus.ENABLED), + new CostThresholdProperties() + .withThresholdId("00000000-0000-0000-0000-000000000003") + .withPercentageThreshold( + new PercentageCostThresholdProperties().withThresholdValue(75.0)) + .withDisplayOnChart(CostThresholdStatus.DISABLED) + .withSendNotificationWhenExceeded(CostThresholdStatus.DISABLED), + new CostThresholdProperties() + .withThresholdId("00000000-0000-0000-0000-000000000004") + .withPercentageThreshold( + new PercentageCostThresholdProperties().withThresholdValue(100.0)) + .withDisplayOnChart(CostThresholdStatus.DISABLED) + .withSendNotificationWhenExceeded(CostThresholdStatus.DISABLED), + new CostThresholdProperties() + .withThresholdId("00000000-0000-0000-0000-000000000005") + .withPercentageThreshold( + new PercentageCostThresholdProperties().withThresholdValue(125.0)) + .withDisplayOnChart(CostThresholdStatus.DISABLED) + .withSendNotificationWhenExceeded(CostThresholdStatus.DISABLED))) + .withCycleStartDateTime(OffsetDateTime.parse("2020-12-01T00:00:00.000Z")) + .withCycleEndDateTime(OffsetDateTime.parse("2020-12-31T00:00:00.000Z")) + .withCycleType(ReportingCycleType.CALENDAR_MONTH)) + .withCurrencyCode("USD") + .withStartDateTime(OffsetDateTime.parse("2020-12-01T00:00:00Z")) + .withEndDateTime(OffsetDateTime.parse("2020-12-31T23:59:59Z")) + .create(); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CostsGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CostsGetSamples.java new file mode 100644 index 000000000000..2ac339bdc314 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CostsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Costs Get. */ +public final class CostsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Costs_Get.json + */ + /** + * Sample code: Costs_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void costsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.costs().getWithResponse("resourceGroupName", "{labName}", "targetCost", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..a2f335e768ea --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesCreateOrUpdateSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.resourcemanager.devtestlabs.models.CustomImagePropertiesFromVm; +import com.azure.resourcemanager.devtestlabs.models.LinuxOsInfo; +import com.azure.resourcemanager.devtestlabs.models.LinuxOsState; +import java.util.HashMap; +import java.util.Map; + +/** Samples for CustomImages CreateOrUpdate. */ +public final class CustomImagesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_CreateOrUpdate.json + */ + /** + * Sample code: CustomImages_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void customImagesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .customImages() + .define("{customImageName}") + .withRegion((String) null) + .withExistingLab("resourceGroupName", "{labName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withVm( + new CustomImagePropertiesFromVm() + .withSourceVmId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}") + .withLinuxOsInfo(new LinuxOsInfo().withLinuxOsState(LinuxOsState.NON_DEPROVISIONED))) + .withDescription("My Custom Image") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesDeleteSamples.java new file mode 100644 index 000000000000..e8d88afe2d15 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for CustomImages Delete. */ +public final class CustomImagesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_Delete.json + */ + /** + * Sample code: CustomImages_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void customImagesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.customImages().delete("resourceGroupName", "{labName}", "{customImageName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesGetSamples.java new file mode 100644 index 000000000000..6b89447df943 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for CustomImages Get. */ +public final class CustomImagesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_Get.json + */ + /** + * Sample code: CustomImages_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void customImagesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .customImages() + .getWithResponse("resourceGroupName", "{labName}", "{customImageName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesListSamples.java new file mode 100644 index 000000000000..dba53ef3aa42 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for CustomImages List. */ +public final class CustomImagesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_List.json + */ + /** + * Sample code: CustomImages_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void customImagesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.customImages().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesUpdateSamples.java new file mode 100644 index 000000000000..b93f58489968 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/CustomImagesUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.CustomImage; +import java.util.HashMap; +import java.util.Map; + +/** Samples for CustomImages Update. */ +public final class CustomImagesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_Update.json + */ + /** + * Sample code: CustomImages_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void customImagesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + CustomImage resource = + manager + .customImages() + .getWithResponse("resourceGroupName", "{labName}", "{customImageName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue2")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksAttachSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksAttachSamples.java new file mode 100644 index 000000000000..55d4a772bb70 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksAttachSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.AttachDiskProperties; + +/** Samples for Disks Attach. */ +public final class DisksAttachSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Attach.json + */ + /** + * Sample code: Disks_Attach. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksAttach(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .disks() + .attach( + "resourceGroupName", + "{labName}", + "{userId}", + "{diskName}", + new AttachDiskProperties() + .withLeasedByLabVmId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}"), + Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksCreateOrUpdateSamples.java new file mode 100644 index 000000000000..f6b720a1c9bf --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksCreateOrUpdateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.resourcemanager.devtestlabs.models.StorageType; + +/** Samples for Disks CreateOrUpdate. */ +public final class DisksCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_CreateOrUpdate.json + */ + /** + * Sample code: Disks_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .disks() + .define("{diskName}") + .withRegion((String) null) + .withExistingUser("resourceGroupName", "{labName}", "{userId}") + .withDiskType(StorageType.STANDARD) + .withDiskSizeGiB(1023) + .withLeasedByLabVmId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/vmName") + .create(); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksDeleteSamples.java new file mode 100644 index 000000000000..ff4baa579633 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Disks Delete. */ +public final class DisksDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Delete.json + */ + /** + * Sample code: Disks_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.disks().delete("resourceGroupName", "{labName}", "{userId}", "{diskName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksDetachSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksDetachSamples.java new file mode 100644 index 000000000000..4b499939bd20 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksDetachSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.DetachDiskProperties; + +/** Samples for Disks Detach. */ +public final class DisksDetachSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Detach.json + */ + /** + * Sample code: Disks_Detach. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksDetach(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .disks() + .detach( + "resourceGroupName", + "{labName}", + "{userId}", + "{diskName}", + new DetachDiskProperties() + .withLeasedByLabVmId( + "/subscriptions/{subscriptionId}/resourcegroups/myResourceGroup/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}"), + Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksGetSamples.java new file mode 100644 index 000000000000..f97f479e1105 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Disks Get. */ +public final class DisksGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Get.json + */ + /** + * Sample code: Disks_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.disks().getWithResponse("resourceGroupName", "{labName}", "@me", "{diskName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksListSamples.java new file mode 100644 index 000000000000..7e415084f7dc --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Disks List. */ +public final class DisksListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_List.json + */ + /** + * Sample code: Disks_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.disks().list("resourceGroupName", "{labName}", "@me", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksUpdateSamples.java new file mode 100644 index 000000000000..e872edd0424f --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/DisksUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.Disk; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Disks Update. */ +public final class DisksUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Update.json + */ + /** + * Sample code: Disks_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void disksUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + Disk resource = + manager + .disks() + .getWithResponse("resourceGroupName", "{labName}", "@me", "diskName", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..940a0de10b3d --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsCreateOrUpdateSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.resourcemanager.devtestlabs.models.EnvironmentDeploymentProperties; +import java.util.Arrays; + +/** Samples for Environments CreateOrUpdate. */ +public final class EnvironmentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_CreateOrUpdate.json + */ + /** + * Sample code: Environments_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void environmentsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .environments() + .define("{environmentName}") + .withRegion((String) null) + .withExistingUser("resourceGroupName", "{labName}", "@me") + .withDeploymentProperties( + new EnvironmentDeploymentProperties() + .withArmTemplateId( + "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}") + .withParameters(Arrays.asList())) + .create(); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsDeleteSamples.java new file mode 100644 index 000000000000..9b3f43cedef5 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Environments Delete. */ +public final class EnvironmentsDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_Delete.json + */ + /** + * Sample code: Environments_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void environmentsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.environments().delete("resourceGroupName", "{labName}", "@me", "{environmentName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsGetSamples.java new file mode 100644 index 000000000000..07940c169530 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Environments Get. */ +public final class EnvironmentsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_Get.json + */ + /** + * Sample code: Environments_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void environmentsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .environments() + .getWithResponse("resourceGroupName", "{labName}", "@me", "{environmentName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsListSamples.java new file mode 100644 index 000000000000..d75a1371f58c --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Environments List. */ +public final class EnvironmentsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_List.json + */ + /** + * Sample code: Environments_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void environmentsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.environments().list("resourceGroupName", "{labName}", "@me", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsUpdateSamples.java new file mode 100644 index 000000000000..58bd14ea8fbb --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/EnvironmentsUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.DtlEnvironment; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Environments Update. */ +public final class EnvironmentsUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_Update.json + */ + /** + * Sample code: Environments_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void environmentsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + DtlEnvironment resource = + manager + .environments() + .getWithResponse("resourceGroupName", "{labName}", "@me", "{environmentName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasCreateOrUpdateSamples.java new file mode 100644 index 000000000000..9ed89bc975a7 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasCreateOrUpdateSamples.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.resourcemanager.devtestlabs.models.ArtifactInstallProperties; +import com.azure.resourcemanager.devtestlabs.models.GalleryImageReference; +import com.azure.resourcemanager.devtestlabs.models.InboundNatRule; +import com.azure.resourcemanager.devtestlabs.models.LabVirtualMachineCreationParameter; +import com.azure.resourcemanager.devtestlabs.models.NetworkInterfaceProperties; +import com.azure.resourcemanager.devtestlabs.models.SharedPublicIpAddressConfiguration; +import com.azure.resourcemanager.devtestlabs.models.TransportProtocol; +import java.util.Arrays; + +/** Samples for Formulas CreateOrUpdate. */ +public final class FormulasCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_CreateOrUpdate.json + */ + /** + * Sample code: Formulas_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void formulasCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .formulas() + .define("{formulaName}") + .withRegion("{location}") + .withExistingLab("resourceGroupName", "{labName}") + .withDescription("Formula using a Linux base") + .withFormulaContent( + new LabVirtualMachineCreationParameter() + .withLocation("{location}") + .withNotes("Ubuntu Server 20.10") + .withSize("Standard_B1ms") + .withUsername("user") + .withIsAuthenticationWithSshKey(false) + .withLabSubnetName("Dtl{labName}Subnet") + .withLabVirtualNetworkId("/virtualnetworks/dtl{labName}") + .withDisallowPublicIpAddress(true) + .withArtifacts( + Arrays + .asList( + new ArtifactInstallProperties() + .withArtifactId( + "/artifactsources/{artifactSourceName}/artifacts/linux-install-nodejs") + .withParameters(Arrays.asList()))) + .withGalleryImageReference( + new GalleryImageReference() + .withOffer("0001-com-ubuntu-server-groovy") + .withPublisher("canonical") + .withSku("20_10") + .withOsType("Linux") + .withVersion("latest")) + .withNetworkInterface( + new NetworkInterfaceProperties() + .withSharedPublicIpAddressConfiguration( + new SharedPublicIpAddressConfiguration() + .withInboundNatRules( + Arrays + .asList( + new InboundNatRule() + .withTransportProtocol(TransportProtocol.TCP) + .withBackendPort(22))))) + .withAllowClaim(false) + .withStorageType("Standard")) + .create(); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasDeleteSamples.java new file mode 100644 index 000000000000..5e1125793cfa --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Formulas Delete. */ +public final class FormulasDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_Delete.json + */ + /** + * Sample code: Formulas_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void formulasDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.formulas().deleteWithResponse("resourceGroupName", "{labName}", "{formulaName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasGetSamples.java new file mode 100644 index 000000000000..d5961e8b6d34 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Formulas Get. */ +public final class FormulasGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_Get.json + */ + /** + * Sample code: Formulas_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void formulasGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.formulas().getWithResponse("resourceGroupName", "{labName}", "{formulaName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasListSamples.java new file mode 100644 index 000000000000..0d5b6f5020d2 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Formulas List. */ +public final class FormulasListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_List.json + */ + /** + * Sample code: Formulas_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void formulasList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.formulas().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasUpdateSamples.java new file mode 100644 index 000000000000..9f1c4cd71400 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/FormulasUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.Formula; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Formulas Update. */ +public final class FormulasUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_Update.json + */ + /** + * Sample code: Formulas_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void formulasUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + Formula resource = + manager + .formulas() + .getWithResponse("resourceGroupName", "{labName}", "{formulaName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GalleryImagesListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GalleryImagesListSamples.java new file mode 100644 index 000000000000..fd317353ea35 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GalleryImagesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for GalleryImages List. */ +public final class GalleryImagesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GalleryImages_List.json + */ + /** + * Sample code: GalleryImages_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void galleryImagesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.galleryImages().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..c8429d0eb8b3 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesCreateOrUpdateSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.resourcemanager.devtestlabs.models.EnableStatus; +import com.azure.resourcemanager.devtestlabs.models.WeekDetails; +import java.util.Arrays; + +/** Samples for GlobalSchedules CreateOrUpdate. */ +public final class GlobalSchedulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_CreateOrUpdate.json + */ + /** + * Sample code: GlobalSchedules_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .globalSchedules() + .define("labvmautostart") + .withRegion((String) null) + .withExistingResourceGroup("resourceGroupName") + .withStatus(EnableStatus.ENABLED) + .withTaskType("LabVmsStartupTask") + .withWeeklyRecurrence( + new WeekDetails() + .withWeekdays(Arrays.asList("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")) + .withTime("0700")) + .withTimeZoneId("Hawaiian Standard Time") + .create(); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesDeleteSamples.java new file mode 100644 index 000000000000..e4db98888e3f --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for GlobalSchedules Delete. */ +public final class GlobalSchedulesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Delete.json + */ + /** + * Sample code: GlobalSchedules_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.globalSchedules().deleteWithResponse("resourceGroupName", "labvmautostart", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesExecuteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesExecuteSamples.java new file mode 100644 index 000000000000..e654e8e4191c --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesExecuteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for GlobalSchedules Execute. */ +public final class GlobalSchedulesExecuteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Execute.json + */ + /** + * Sample code: GlobalSchedules_Execute. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesExecute(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.globalSchedules().execute("resourceGroupName", "labvmautostart", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesGetByResourceGroupSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..ec91bd259912 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesGetByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for GlobalSchedules GetByResourceGroup. */ +public final class GlobalSchedulesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Get.json + */ + /** + * Sample code: GlobalSchedules_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .globalSchedules() + .getByResourceGroupWithResponse("resourceGroupName", "labvmautostart", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesListByResourceGroupSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesListByResourceGroupSamples.java new file mode 100644 index 000000000000..17dbb5e886ce --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for GlobalSchedules ListByResourceGroup. */ +public final class GlobalSchedulesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_ListByResourceGroup.json + */ + /** + * Sample code: GlobalSchedules_ListByResourceGroup. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesListByResourceGroup( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.globalSchedules().listByResourceGroup("resourceGroupName", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesListSamples.java new file mode 100644 index 000000000000..824e6b1651e4 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for GlobalSchedules List. */ +public final class GlobalSchedulesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_ListBySubscription.json + */ + /** + * Sample code: GlobalSchedules_ListBySubscription. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesListBySubscription( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.globalSchedules().list(null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesRetargetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesRetargetSamples.java new file mode 100644 index 000000000000..8978dd40bf67 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesRetargetSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.RetargetScheduleProperties; + +/** Samples for GlobalSchedules Retarget. */ +public final class GlobalSchedulesRetargetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Retarget.json + */ + /** + * Sample code: GlobalSchedules_Retarget. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesRetarget(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .globalSchedules() + .retarget( + "resourceGroupName", + "{scheduleName}", + new RetargetScheduleProperties() + .withCurrentResourceId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{targetLab}") + .withTargetResourceId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{currentLab}"), + Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesUpdateSamples.java new file mode 100644 index 000000000000..ec70efc3c84a --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/GlobalSchedulesUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.Schedule; +import java.util.HashMap; +import java.util.Map; + +/** Samples for GlobalSchedules Update. */ +public final class GlobalSchedulesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Update.json + */ + /** + * Sample code: GlobalSchedules_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void globalSchedulesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + Schedule resource = + manager + .globalSchedules() + .getByResourceGroupWithResponse("resourceGroupName", "labvmautostart", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsClaimAnyVmSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsClaimAnyVmSamples.java new file mode 100644 index 000000000000..320117c0659f --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsClaimAnyVmSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Labs ClaimAnyVm. */ +public final class LabsClaimAnyVmSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ClaimAnyVm.json + */ + /** + * Sample code: Labs_ClaimAnyVm. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsClaimAnyVm(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.labs().claimAnyVm("resourceGroupName", "{labName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsCreateEnvironmentSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsCreateEnvironmentSamples.java new file mode 100644 index 000000000000..8862eb684feb --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsCreateEnvironmentSamples.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.GalleryImageReference; +import com.azure.resourcemanager.devtestlabs.models.LabVirtualMachineCreationParameter; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Labs CreateEnvironment. */ +public final class LabsCreateEnvironmentSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_CreateEnvironment.json + */ + /** + * Sample code: Labs_CreateEnvironment. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsCreateEnvironment(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .labs() + .createEnvironment( + "resourceGroupName", + "{labName}", + new LabVirtualMachineCreationParameter() + .withName("{vmName}") + .withLocation("{location}") + .withTags(mapOf("tagName1", "tagValue1")) + .withSize("Standard_A2_v2") + .withUsername("{userName}") + .withPassword("{userPassword}") + .withLabSubnetName("{virtualnetwork-subnet-name}") + .withLabVirtualNetworkId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}") + .withDisallowPublicIpAddress(true) + .withGalleryImageReference( + new GalleryImageReference() + .withOffer("UbuntuServer") + .withPublisher("Canonical") + .withSku("16.04-LTS") + .withOsType("Linux") + .withVersion("Latest")) + .withAllowClaim(true) + .withStorageType("Standard"), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..238fa88d64d7 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsCreateOrUpdateSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.resourcemanager.devtestlabs.models.StorageType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Labs CreateOrUpdate. */ +public final class LabsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_CreateOrUpdate.json + */ + /** + * Sample code: Labs_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .labs() + .define("{labName}") + .withRegion("{location}") + .withExistingResourceGroup("resourceGroupName") + .withTags(mapOf("tagName1", "tagValue1")) + .withLabStorageType(StorageType.fromString("{Standard|Premium}")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsDeleteSamples.java new file mode 100644 index 000000000000..1377af858d56 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Labs Delete. */ +public final class LabsDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_Delete.json + */ + /** + * Sample code: Labs_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.labs().delete("resourceGroupName", "{labName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsExportResourceUsageSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsExportResourceUsageSamples.java new file mode 100644 index 000000000000..ffd96d42d76a --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsExportResourceUsageSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ExportResourceUsageParameters; +import java.time.OffsetDateTime; + +/** Samples for Labs ExportResourceUsage. */ +public final class LabsExportResourceUsageSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ExportResourceUsage.json + */ + /** + * Sample code: Labs_ExportResourceUsage. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsExportResourceUsage(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .labs() + .exportResourceUsage( + "resourceGroupName", + "{labName}", + new ExportResourceUsageParameters() + .withBlobStorageAbsoluteSasUri( + "https://invalid.blob.core.windows.net/export.blob?sv=2015-07-08&sig={sas}&sp=rcw") + .withUsageStartDate(OffsetDateTime.parse("2020-12-01T00:00:00Z")), + Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsGenerateUploadUriSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsGenerateUploadUriSamples.java new file mode 100644 index 000000000000..b91ba27e1e8f --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsGenerateUploadUriSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.GenerateUploadUriParameter; + +/** Samples for Labs GenerateUploadUri. */ +public final class LabsGenerateUploadUriSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_GenerateUploadUri.json + */ + /** + * Sample code: Labs_GenerateUploadUri. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsGenerateUploadUri(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .labs() + .generateUploadUriWithResponse( + "resourceGroupName", + "{labName}", + new GenerateUploadUriParameter().withBlobName("{blob-name}"), + Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsGetByResourceGroupSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..7c45689ec037 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Labs GetByResourceGroup. */ +public final class LabsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_Get.json + */ + /** + * Sample code: Labs_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.labs().getByResourceGroupWithResponse("resourceGroupName", "{labName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsImportVirtualMachineSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsImportVirtualMachineSamples.java new file mode 100644 index 000000000000..47b806911bed --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsImportVirtualMachineSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ImportLabVirtualMachineRequest; + +/** Samples for Labs ImportVirtualMachine. */ +public final class LabsImportVirtualMachineSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ImportVirtualMachine.json + */ + /** + * Sample code: Labs_ImportVirtualMachine. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsImportVirtualMachine(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .labs() + .importVirtualMachine( + "resourceGroupName", + "{labName}", + new ImportLabVirtualMachineRequest() + .withSourceVirtualMachineResourceId( + "/subscriptions/{subscriptionId}/resourceGroups/{otherResourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") + .withDestinationVirtualMachineName("{vmName}"), + Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsListByResourceGroupSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsListByResourceGroupSamples.java new file mode 100644 index 000000000000..a2e90a5745b8 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsListByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Labs ListByResourceGroup. */ +public final class LabsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ListByResourceGroup.json + */ + /** + * Sample code: Labs_ListByResourceGroup. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsListByResourceGroup(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.labs().listByResourceGroup("resourceGroupName", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsListSamples.java new file mode 100644 index 000000000000..970ce0e9fea6 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Labs List. */ +public final class LabsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ListBySubscription.json + */ + /** + * Sample code: Labs_ListBySubscription. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsListBySubscription(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.labs().list(null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsListVhdsSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsListVhdsSamples.java new file mode 100644 index 000000000000..84c759219a5f --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsListVhdsSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Labs ListVhds. */ +public final class LabsListVhdsSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ListVhds.json + */ + /** + * Sample code: Labs_ListVhds. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsListVhds(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.labs().listVhds("resourceGroupName", "{labName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsUpdateSamples.java new file mode 100644 index 000000000000..136cb20146a4 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/LabsUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.Lab; + +/** Samples for Labs Update. */ +public final class LabsUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_Update.json + */ + /** + * Sample code: Labs_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void labsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + Lab resource = + manager + .labs() + .getByResourceGroupWithResponse("resourceGroupName", "{labName}", null, Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..5143e43d5969 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsCreateOrUpdateSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.resourcemanager.devtestlabs.models.Event; +import com.azure.resourcemanager.devtestlabs.models.NotificationChannelEventType; +import java.util.Arrays; + +/** Samples for NotificationChannels CreateOrUpdate. */ +public final class NotificationChannelsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_CreateOrUpdate.json + */ + /** + * Sample code: NotificationChannels_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void notificationChannelsCreateOrUpdate( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .notificationChannels() + .define("{notificationChannelName}") + .withRegion((String) null) + .withExistingLab("resourceGroupName", "{labName}") + .withWebhookUrl("{webhookUrl}") + .withEmailRecipient("{email}") + .withNotificationLocale("en") + .withDescription("Integration configured for auto-shutdown") + .withEvents(Arrays.asList(new Event().withEventName(NotificationChannelEventType.AUTO_SHUTDOWN))) + .create(); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsDeleteSamples.java new file mode 100644 index 000000000000..9ad118677dcf --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for NotificationChannels Delete. */ +public final class NotificationChannelsDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_Delete.json + */ + /** + * Sample code: NotificationChannels_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void notificationChannelsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .notificationChannels() + .deleteWithResponse("resourceGroupName", "{labName}", "{notificationChannelName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsGetSamples.java new file mode 100644 index 000000000000..09351a1ce352 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for NotificationChannels Get. */ +public final class NotificationChannelsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_Get.json + */ + /** + * Sample code: NotificationChannels_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void notificationChannelsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .notificationChannels() + .getWithResponse("resourceGroupName", "{labName}", "{notificationChannelName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsListSamples.java new file mode 100644 index 000000000000..348d4847252f --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for NotificationChannels List. */ +public final class NotificationChannelsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_List.json + */ + /** + * Sample code: NotificationChannels_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void notificationChannelsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.notificationChannels().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsNotifySamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsNotifySamples.java new file mode 100644 index 000000000000..731f9ed8d4cb --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsNotifySamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.NotificationChannelEventType; +import com.azure.resourcemanager.devtestlabs.models.NotifyParameters; + +/** Samples for NotificationChannels Notify. */ +public final class NotificationChannelsNotifySamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_Notify.json + */ + /** + * Sample code: NotificationChannels_Notify. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void notificationChannelsNotify(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .notificationChannels() + .notifyWithResponse( + "resourceGroupName", + "{labName}", + "{notificationChannelName}", + new NotifyParameters() + .withEventName(NotificationChannelEventType.AUTO_SHUTDOWN) + .withJsonPayload( + "{\"eventType\":\"AutoShutdown\",\"subscriptionId\":\"{subscriptionId}\",\"resourceGroupName\":\"resourceGroupName\",\"labName\":\"{labName}\"}"), + Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsUpdateSamples.java new file mode 100644 index 000000000000..51120aa042a0 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/NotificationChannelsUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.NotificationChannel; + +/** Samples for NotificationChannels Update. */ +public final class NotificationChannelsUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_Update.json + */ + /** + * Sample code: NotificationChannels_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void notificationChannelsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + NotificationChannel resource = + manager + .notificationChannels() + .getWithResponse("resourceGroupName", "{labName}", "{notificationChannelName}", null, Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/OperationsGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/OperationsGetSamples.java new file mode 100644 index 000000000000..45389c28b7f3 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/OperationsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Operations Get. */ +public final class OperationsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Operations_Get.json + */ + /** + * Sample code: Operations_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void operationsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.operations().getWithResponse("{locationName}", "{operationName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..9ea2ebd33888 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesCreateOrUpdateSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.resourcemanager.devtestlabs.models.PolicyEvaluatorType; +import com.azure.resourcemanager.devtestlabs.models.PolicyFactName; +import com.azure.resourcemanager.devtestlabs.models.PolicyStatus; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Policies CreateOrUpdate. */ +public final class PoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_CreateOrUpdate.json + */ + /** + * Sample code: Policies_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void policiesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .policies() + .define("{policyName}") + .withRegion("{location}") + .withExistingPolicyset("resourceGroupName", "{labName}", "{policySetName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withDescription("{policyDescription}") + .withStatus(PolicyStatus.fromString("{policyStatus}")) + .withFactName(PolicyFactName.fromString("{policyFactName}")) + .withFactData("{policyFactData}") + .withThreshold("{policyThreshold}") + .withEvaluatorType(PolicyEvaluatorType.fromString("{policyEvaluatorType}")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesDeleteSamples.java new file mode 100644 index 000000000000..c31551a26824 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Policies Delete. */ +public final class PoliciesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_Delete.json + */ + /** + * Sample code: Policies_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void policiesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .policies() + .deleteWithResponse("resourceGroupName", "{labName}", "{policySetName}", "{policyName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesGetSamples.java new file mode 100644 index 000000000000..19bb785a60b2 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Policies Get. */ +public final class PoliciesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_Get.json + */ + /** + * Sample code: Policies_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void policiesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .policies() + .getWithResponse("resourceGroupName", "{labName}", "{policySetName}", "{policyName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesListSamples.java new file mode 100644 index 000000000000..b70c76c71e9a --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Policies List. */ +public final class PoliciesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_List.json + */ + /** + * Sample code: Policies_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void policiesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .policies() + .list("resourceGroupName", "{labName}", "{policySetName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesUpdateSamples.java new file mode 100644 index 000000000000..fc63d05182c0 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PoliciesUpdateSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.Policy; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Policies Update. */ +public final class PoliciesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_Update.json + */ + /** + * Sample code: Policies_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void policiesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + Policy resource = + manager + .policies() + .getWithResponse( + "resourceGroupName", "{labName}", "{policySetName}", "{policyName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PolicySetsEvaluatePoliciesSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PolicySetsEvaluatePoliciesSamples.java new file mode 100644 index 000000000000..44a649bdc525 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/PolicySetsEvaluatePoliciesSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.EvaluatePoliciesProperties; +import com.azure.resourcemanager.devtestlabs.models.EvaluatePoliciesRequest; +import java.util.Arrays; + +/** Samples for PolicySets EvaluatePolicies. */ +public final class PolicySetsEvaluatePoliciesSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/PolicySets_EvaluatePolicies.json + */ + /** + * Sample code: PolicySets_EvaluatePolicies. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void policySetsEvaluatePolicies(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .policySets() + .evaluatePoliciesWithResponse( + "resourceGroupName", + "{labName}", + "{policySetName}", + new EvaluatePoliciesRequest() + .withPolicies( + Arrays + .asList(new EvaluatePoliciesProperties().withFactName("LabVmCount").withValueOffset("1"))), + Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ProviderOperationsListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ProviderOperationsListSamples.java new file mode 100644 index 000000000000..1766021a2d75 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ProviderOperationsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ProviderOperations List. */ +public final class ProviderOperationsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ProviderOperations_List.json + */ + /** + * Sample code: ProviderOperations_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void providerOperationsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.providerOperations().list(Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..6a0f75b98006 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesCreateOrUpdateSamples.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.fluent.models.ScheduleInner; +import com.azure.resourcemanager.devtestlabs.models.DayDetails; +import com.azure.resourcemanager.devtestlabs.models.EnableStatus; +import com.azure.resourcemanager.devtestlabs.models.HourDetails; +import com.azure.resourcemanager.devtestlabs.models.NotificationSettings; +import com.azure.resourcemanager.devtestlabs.models.WeekDetails; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Schedules CreateOrUpdate. */ +public final class SchedulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_CreateOrUpdate.json + */ + /** + * Sample code: Schedules_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .schedules() + .createOrUpdateWithResponse( + "resourceGroupName", + "{labName}", + "{scheduleName}", + new ScheduleInner() + .withLocation("{location}") + .withTags(mapOf("tagName1", "tagValue1")) + .withStatus(EnableStatus.fromString("{Enabled|Disabled}")) + .withTaskType("{myLabVmTaskType}") + .withWeeklyRecurrence( + new WeekDetails() + .withWeekdays(Arrays.asList("Monday", "Wednesday", "Friday")) + .withTime("{timeOfTheDayTheScheduleWillOccurOnThoseDays}")) + .withDailyRecurrence(new DayDetails().withTime("{timeOfTheDayTheScheduleWillOccurEveryDay}")) + .withHourlyRecurrence(new HourDetails().withMinute(30)) + .withTimeZoneId("Pacific Standard Time") + .withNotificationSettings( + new NotificationSettings() + .withStatus(EnableStatus.fromString("{Enabled|Disabled}")) + .withTimeInMinutes(15) + .withWebhookUrl("{webhookUrl}") + .withEmailRecipient("{email}") + .withNotificationLocale("EN")) + .withTargetResourceId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}"), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesDeleteSamples.java new file mode 100644 index 000000000000..665dfedaa07a --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Schedules Delete. */ +public final class SchedulesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_Delete.json + */ + /** + * Sample code: Schedules_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.schedules().deleteWithResponse("resourceGroupName", "{labName}", "{scheduleName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesExecuteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesExecuteSamples.java new file mode 100644 index 000000000000..3f055fcccfc0 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesExecuteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Schedules Execute. */ +public final class SchedulesExecuteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_Execute.json + */ + /** + * Sample code: Schedules_Execute. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesExecute(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.schedules().execute("resourceGroupName", "{labName}", "{scheduleName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesGetSamples.java new file mode 100644 index 000000000000..4503fb13ac2e --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Schedules Get. */ +public final class SchedulesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_Get.json + */ + /** + * Sample code: Schedules_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.schedules().getWithResponse("resourceGroupName", "{labName}", "{scheduleName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesListApplicableSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesListApplicableSamples.java new file mode 100644 index 000000000000..4891375d4120 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesListApplicableSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Schedules ListApplicable. */ +public final class SchedulesListApplicableSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_ListApplicable.json + */ + /** + * Sample code: Schedules_ListApplicable. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesListApplicable(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.schedules().listApplicable("resourceGroupName", "{labName}", "{scheduleName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesListSamples.java new file mode 100644 index 000000000000..2a7a424ba648 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Schedules List. */ +public final class SchedulesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_List.json + */ + /** + * Sample code: Schedules_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.schedules().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesUpdateSamples.java new file mode 100644 index 000000000000..be1763bd351b --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SchedulesUpdateSamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ScheduleFragment; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Schedules Update. */ +public final class SchedulesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_Update.json + */ + /** + * Sample code: Schedules_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void schedulesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .schedules() + .updateWithResponse( + "resourceGroupName", + "{labName}", + "{scheduleName}", + new ScheduleFragment().withTags(mapOf("tagName1", "tagValue1")), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..d4749b0cac0c --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsCreateOrUpdateSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +/** Samples for Secrets CreateOrUpdate. */ +public final class SecretsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_CreateOrUpdate.json + */ + /** + * Sample code: Secrets_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void secretsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .secrets() + .define("{secretName}") + .withRegion((String) null) + .withExistingUser("resourceGroupName", "{labName}", "{userName}") + .withValue("{secret}") + .create(); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsDeleteSamples.java new file mode 100644 index 000000000000..3f5b457650db --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Secrets Delete. */ +public final class SecretsDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_Delete.json + */ + /** + * Sample code: Secrets_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void secretsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .secrets() + .deleteWithResponse("resourceGroupName", "{labName}", "{userName}", "{secretName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsGetSamples.java new file mode 100644 index 000000000000..d3f341d12ff8 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Secrets Get. */ +public final class SecretsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_Get.json + */ + /** + * Sample code: Secrets_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void secretsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .secrets() + .getWithResponse("resourceGroupName", "{labName}", "{userName}", "{secretName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsListSamples.java new file mode 100644 index 000000000000..aaec5cb5aa2f --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Secrets List. */ +public final class SecretsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_List.json + */ + /** + * Sample code: Secrets_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void secretsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.secrets().list("resourceGroupName", "{labName}", "{userName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsUpdateSamples.java new file mode 100644 index 000000000000..dd68fa39f0e2 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/SecretsUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.Secret; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Secrets Update. */ +public final class SecretsUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_Update.json + */ + /** + * Sample code: Secrets_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void secretsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + Secret resource = + manager + .secrets() + .getWithResponse("resourceGroupName", "{labName}", "{userName}", "{secretName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..207a65f5241e --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesCreateOrUpdateSamples.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.fluent.models.ScheduleInner; +import com.azure.resourcemanager.devtestlabs.models.DayDetails; +import com.azure.resourcemanager.devtestlabs.models.EnableStatus; +import com.azure.resourcemanager.devtestlabs.models.HourDetails; +import com.azure.resourcemanager.devtestlabs.models.NotificationSettings; +import com.azure.resourcemanager.devtestlabs.models.WeekDetails; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ServiceFabricSchedules CreateOrUpdate. */ +public final class ServiceFabricSchedulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_CreateOrUpdate.json + */ + /** + * Sample code: ServiceFabricSchedules_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricSchedulesCreateOrUpdate( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabricSchedules() + .createOrUpdateWithResponse( + "resourceGroupName", + "{labName}", + "@me", + "{serviceFrabicName}", + "{scheduleName}", + new ScheduleInner() + .withLocation("{location}") + .withTags(mapOf("tagName1", "tagValue1")) + .withStatus(EnableStatus.fromString("{Enabled|Disabled}")) + .withTaskType( + "{Unknown|LabVmsShutdownTask|LabVmsStartupTask|LabVmReclamationTask|ComputeVmShutdownTask}") + .withWeeklyRecurrence( + new WeekDetails() + .withWeekdays( + Arrays + .asList( + "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")) + .withTime("19:00")) + .withDailyRecurrence(new DayDetails().withTime("19:00")) + .withHourlyRecurrence(new HourDetails().withMinute(0)) + .withTimeZoneId("Pacific Standard Time") + .withNotificationSettings( + new NotificationSettings() + .withStatus(EnableStatus.fromString("{Enabled|Disabled}")) + .withTimeInMinutes(15) + .withWebhookUrl("{webhoolUrl}") + .withEmailRecipient("{email}") + .withNotificationLocale("EN")) + .withTargetResourceId( + "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/users/{uniqueIdentifier}/servicefabrics/{serviceFrabicName}"), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesDeleteSamples.java new file mode 100644 index 000000000000..b3099c51be7f --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ServiceFabricSchedules Delete. */ +public final class ServiceFabricSchedulesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_Delete.json + */ + /** + * Sample code: ServiceFabricSchedules_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricSchedulesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabricSchedules() + .deleteWithResponse( + "resourceGroupName", "{labName}", "@me", "{serviceFrabicName}", "{scheduleName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesExecuteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesExecuteSamples.java new file mode 100644 index 000000000000..2cc779dbfaca --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesExecuteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ServiceFabricSchedules Execute. */ +public final class ServiceFabricSchedulesExecuteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_Execute.json + */ + /** + * Sample code: ServiceFabricSchedules_Execute. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricSchedulesExecute(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabricSchedules() + .execute("resourceGroupName", "{labName}", "@me", "{serviceFrabicName}", "{scheduleName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesGetSamples.java new file mode 100644 index 000000000000..8179893bce0d --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ServiceFabricSchedules Get. */ +public final class ServiceFabricSchedulesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_Get.json + */ + /** + * Sample code: ServiceFabricSchedules_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricSchedulesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabricSchedules() + .getWithResponse( + "resourceGroupName", "{labName}", "@me", "{serviceFrabicName}", "{scheduleName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesListSamples.java new file mode 100644 index 000000000000..11abd500ce7c --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ServiceFabricSchedules List. */ +public final class ServiceFabricSchedulesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_List.json + */ + /** + * Sample code: ServiceFabricSchedules_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricSchedulesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabricSchedules() + .list("resourceGroupName", "{labName}", "@me", "{serviceFrabicName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesUpdateSamples.java new file mode 100644 index 000000000000..5c286c2f4529 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricSchedulesUpdateSamples.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ScheduleFragment; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ServiceFabricSchedules Update. */ +public final class ServiceFabricSchedulesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_Update.json + */ + /** + * Sample code: ServiceFabricSchedules_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricSchedulesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabricSchedules() + .updateWithResponse( + "resourceGroupName", + "{labName}", + "@me", + "{serviceFrabicName}", + "{scheduleName}", + new ScheduleFragment().withTags(mapOf("tagName1", "tagValue1")), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..743725eaace2 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsCreateOrUpdateSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import java.util.HashMap; +import java.util.Map; + +/** Samples for ServiceFabrics CreateOrUpdate. */ +public final class ServiceFabricsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_CreateOrUpdate.json + */ + /** + * Sample code: ServiceFabrics_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .define("{serviceFabricName}") + .withRegion("{location}") + .withExistingUser("resourceGroupName", "{labName}", "{userName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withExternalServiceFabricId("{serviceFabricId}") + .withEnvironmentId("{environmentId}") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsDeleteSamples.java new file mode 100644 index 000000000000..3b32348d4185 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ServiceFabrics Delete. */ +public final class ServiceFabricsDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Delete.json + */ + /** + * Sample code: ServiceFabrics_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .delete("resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsGetSamples.java new file mode 100644 index 000000000000..fc34ac9c0a00 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ServiceFabrics Get. */ +public final class ServiceFabricsGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Get.json + */ + /** + * Sample code: ServiceFabrics_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .getWithResponse("resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsListApplicableSchedulesSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsListApplicableSchedulesSamples.java new file mode 100644 index 000000000000..a934bd1c1a24 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsListApplicableSchedulesSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ServiceFabrics ListApplicableSchedules. */ +public final class ServiceFabricsListApplicableSchedulesSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_ListApplicableSchedules.json + */ + /** + * Sample code: ServiceFabrics_ListApplicableSchedules. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsListApplicableSchedules( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .listApplicableSchedulesWithResponse( + "resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsListSamples.java new file mode 100644 index 000000000000..b80c169a7aa3 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ServiceFabrics List. */ +public final class ServiceFabricsListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_List.json + */ + /** + * Sample code: ServiceFabrics_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .list("resourceGroupName", "{labName}", "{userName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsStartSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsStartSamples.java new file mode 100644 index 000000000000..621fa4f5d137 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsStartSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ServiceFabrics Start. */ +public final class ServiceFabricsStartSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Start.json + */ + /** + * Sample code: ServiceFabrics_Start. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsStart(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .start("resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsStopSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsStopSamples.java new file mode 100644 index 000000000000..46d09443ce1b --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsStopSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ServiceFabrics Stop. */ +public final class ServiceFabricsStopSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Stop.json + */ + /** + * Sample code: ServiceFabrics_Stop. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsStop(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceFabrics() + .stop("resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsUpdateSamples.java new file mode 100644 index 000000000000..fd9fcac703df --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceFabricsUpdateSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ServiceFabric; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ServiceFabrics Update. */ +public final class ServiceFabricsUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Update.json + */ + /** + * Sample code: ServiceFabrics_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceFabricsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + ServiceFabric resource = + manager + .serviceFabrics() + .getWithResponse( + "resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceRunnersCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceRunnersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..3525111da751 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceRunnersCreateOrUpdateSamples.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.resourcemanager.devtestlabs.models.IdentityProperties; +import com.azure.resourcemanager.devtestlabs.models.ManagedIdentityType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ServiceRunners CreateOrUpdate. */ +public final class ServiceRunnersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceRunners_CreateOrUpdate.json + */ + /** + * Sample code: ServiceRunners_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceRunnersCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceRunners() + .define("{servicerunnerName}") + .withRegion("{location}") + .withExistingLab("resourceGroupName", "{devtestlabName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withIdentity( + new IdentityProperties() + .withType(ManagedIdentityType.fromString("{identityType}")) + .withPrincipalId("{identityPrincipalId}") + .withTenantId("{identityTenantId}") + .withClientSecretUrl("{identityClientSecretUrl}")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceRunnersDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceRunnersDeleteSamples.java new file mode 100644 index 000000000000..c05d9faef517 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceRunnersDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ServiceRunners Delete. */ +public final class ServiceRunnersDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceRunners_Delete.json + */ + /** + * Sample code: ServiceRunners_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceRunnersDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceRunners() + .deleteWithResponse("resourceGroupName", "{devtestlabName}", "{servicerunnerName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceRunnersGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceRunnersGetSamples.java new file mode 100644 index 000000000000..ae178eba7337 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/ServiceRunnersGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for ServiceRunners Get. */ +public final class ServiceRunnersGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceRunners_Get.json + */ + /** + * Sample code: ServiceRunners_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void serviceRunnersGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .serviceRunners() + .getWithResponse("resourceGroupName", "{devtestlabName}", "{servicerunnerName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..6a7a1391a8a6 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersCreateOrUpdateSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.resourcemanager.devtestlabs.models.UserIdentity; +import com.azure.resourcemanager.devtestlabs.models.UserSecretStore; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Users CreateOrUpdate. */ +public final class UsersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_CreateOrUpdate.json + */ + /** + * Sample code: Users_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void usersCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .users() + .define("{userName}") + .withRegion("{location}") + .withExistingLab("resourceGroupName", "{devtestlabName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withIdentity( + new UserIdentity() + .withPrincipalName("{principalName}") + .withPrincipalId("{principalId}") + .withTenantId("{tenantId}") + .withObjectId("{objectId}") + .withAppId("{appId}")) + .withSecretStore(new UserSecretStore().withKeyVaultUri("{keyVaultUri}").withKeyVaultId("{keyVaultId}")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersDeleteSamples.java new file mode 100644 index 000000000000..99e3b1fa64ec --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Users Delete. */ +public final class UsersDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_Delete.json + */ + /** + * Sample code: Users_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void usersDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.users().delete("resourceGroupName", "{devtestlabName}", "{userName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersGetSamples.java new file mode 100644 index 000000000000..dfb95299341c --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Users Get. */ +public final class UsersGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_Get.json + */ + /** + * Sample code: Users_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void usersGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.users().getWithResponse("resourceGroupName", "{devtestlabName}", "{userName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersListSamples.java new file mode 100644 index 000000000000..c6b46d710657 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for Users List. */ +public final class UsersListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_List.json + */ + /** + * Sample code: Users_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void usersList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.users().list("resourceGroupName", "{devtestlabName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersUpdateSamples.java new file mode 100644 index 000000000000..2ce91c5ccdad --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/UsersUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.User; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Users Update. */ +public final class UsersUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_Update.json + */ + /** + * Sample code: Users_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void usersUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + User resource = + manager + .users() + .getWithResponse("resourceGroupName", "{devtestlabName}", "{userName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..dcd5fd3ece0b --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesCreateOrUpdateSamples.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.fluent.models.ScheduleInner; +import com.azure.resourcemanager.devtestlabs.models.DayDetails; +import com.azure.resourcemanager.devtestlabs.models.EnableStatus; +import com.azure.resourcemanager.devtestlabs.models.HourDetails; +import com.azure.resourcemanager.devtestlabs.models.NotificationSettings; +import com.azure.resourcemanager.devtestlabs.models.WeekDetails; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for VirtualMachineSchedules CreateOrUpdate. */ +public final class VirtualMachineSchedulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_CreateOrUpdate.json + */ + /** + * Sample code: VirtualMachineSchedules_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachineSchedulesCreateOrUpdate( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachineSchedules() + .createOrUpdateWithResponse( + "resourceGroupName", + "{labName}", + "{vmName}", + "LabVmsShutdown", + new ScheduleInner() + .withLocation("{location}") + .withTags(mapOf("tagName1", "tagValue1")) + .withStatus(EnableStatus.ENABLED) + .withTaskType("LabVmsShutdownTask") + .withWeeklyRecurrence( + new WeekDetails().withWeekdays(Arrays.asList("Friday", "Saturday", "Sunday")).withTime("1700")) + .withDailyRecurrence(new DayDetails().withTime("1900")) + .withHourlyRecurrence(new HourDetails().withMinute(30)) + .withTimeZoneId("Pacific Standard Time") + .withNotificationSettings( + new NotificationSettings() + .withStatus(EnableStatus.ENABLED) + .withTimeInMinutes(30) + .withWebhookUrl("{webhookUrl}") + .withEmailRecipient("{email}") + .withNotificationLocale("EN")) + .withTargetResourceId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualMachines/{vmName}"), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesDeleteSamples.java new file mode 100644 index 000000000000..87040349fa08 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachineSchedules Delete. */ +public final class VirtualMachineSchedulesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_Delete.json + */ + /** + * Sample code: VirtualMachineSchedules_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachineSchedulesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachineSchedules() + .deleteWithResponse("resourceGroupName", "{labName}", "{vmName}", "LabVmsShutdown", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesExecuteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesExecuteSamples.java new file mode 100644 index 000000000000..8c0b1202761b --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesExecuteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachineSchedules Execute. */ +public final class VirtualMachineSchedulesExecuteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_Execute.json + */ + /** + * Sample code: VirtualMachineSchedules_Execute. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachineSchedulesExecute( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachineSchedules() + .execute("resourceGroupName", "{labName}", "{vmName}", "LabVmsShutdown", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesGetSamples.java new file mode 100644 index 000000000000..1356ac5e7fac --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachineSchedules Get. */ +public final class VirtualMachineSchedulesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_Get.json + */ + /** + * Sample code: VirtualMachineSchedules_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachineSchedulesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachineSchedules() + .getWithResponse("resourceGroupName", "{labName}", "{vmName}", "LabVmsShutdown", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesListSamples.java new file mode 100644 index 000000000000..5db66d6f7e0c --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachineSchedules List. */ +public final class VirtualMachineSchedulesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_List.json + */ + /** + * Sample code: VirtualMachineSchedules_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachineSchedulesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachineSchedules() + .list("resourceGroupName", "{labName}", "{vmName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesUpdateSamples.java new file mode 100644 index 000000000000..d0b9e90cfcbb --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachineSchedulesUpdateSamples.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ScheduleFragment; +import java.util.HashMap; +import java.util.Map; + +/** Samples for VirtualMachineSchedules Update. */ +public final class VirtualMachineSchedulesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_Update.json + */ + /** + * Sample code: VirtualMachineSchedules_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachineSchedulesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachineSchedules() + .updateWithResponse( + "resourceGroupName", + "{labName}", + "{vmName}", + "LabVmsShutdown", + new ScheduleFragment().withTags(mapOf("tagName1", "tagValue1")), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesAddDataDiskSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesAddDataDiskSamples.java new file mode 100644 index 000000000000..31b99e39b348 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesAddDataDiskSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.AttachNewDataDiskOptions; +import com.azure.resourcemanager.devtestlabs.models.DataDiskProperties; +import com.azure.resourcemanager.devtestlabs.models.StorageType; + +/** Samples for VirtualMachines AddDataDisk. */ +public final class VirtualMachinesAddDataDiskSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_AddDataDisk.json + */ + /** + * Sample code: VirtualMachines_AddDataDisk. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesAddDataDisk(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .addDataDisk( + "resourceGroupName", + "{labName}", + "{virtualMachineName}", + new DataDiskProperties() + .withAttachNewDataDiskOptions( + new AttachNewDataDiskOptions() + .withDiskSizeGiB(127) + .withDiskName("{diskName}") + .withDiskType(StorageType.fromString("{diskType}"))), + Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesApplyArtifactsSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesApplyArtifactsSamples.java new file mode 100644 index 000000000000..3920dfb0937c --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesApplyArtifactsSamples.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ApplyArtifactsRequest; +import com.azure.resourcemanager.devtestlabs.models.ArtifactInstallProperties; +import java.util.Arrays; + +/** Samples for VirtualMachines ApplyArtifacts. */ +public final class VirtualMachinesApplyArtifactsSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_ApplyArtifacts.json + */ + /** + * Sample code: VirtualMachines_ApplyArtifacts. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesApplyArtifacts(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .applyArtifacts( + "resourceGroupName", + "{labName}", + "{vmName}", + new ApplyArtifactsRequest() + .withArtifacts( + Arrays + .asList( + new ArtifactInstallProperties() + .withArtifactId( + "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/public" + + " repo/artifacts/windows-restart"))), + Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesClaimSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesClaimSamples.java new file mode 100644 index 000000000000..a47a1b1f6b63 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesClaimSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Claim. */ +public final class VirtualMachinesClaimSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Claim.json + */ + /** + * Sample code: VirtualMachines_Claim. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesClaim(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().claim("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..d932ed0b0029 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesCreateOrUpdateSamples.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.resourcemanager.devtestlabs.models.GalleryImageReference; +import java.util.HashMap; +import java.util.Map; + +/** Samples for VirtualMachines CreateOrUpdate. */ +public final class VirtualMachinesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_CreateOrUpdate.json + */ + /** + * Sample code: VirtualMachines_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .define("{vmName}") + .withRegion("{location}") + .withExistingLab("resourceGroupName", "{labName}") + .withTags(mapOf("tagName1", "tagValue1")) + .withSize("Standard_A2_v2") + .withUsername("{userName}") + .withPassword("{userPassword}") + .withLabSubnetName("{virtualNetworkName}Subnet") + .withLabVirtualNetworkId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}") + .withDisallowPublicIpAddress(true) + .withGalleryImageReference( + new GalleryImageReference() + .withOffer("UbuntuServer") + .withPublisher("Canonical") + .withSku("16.04-LTS") + .withOsType("Linux") + .withVersion("Latest")) + .withAllowClaim(true) + .withStorageType("Standard") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesDeleteSamples.java new file mode 100644 index 000000000000..78641517ba33 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Delete. */ +public final class VirtualMachinesDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Delete.json + */ + /** + * Sample code: VirtualMachines_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().delete("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesDetachDataDiskSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesDetachDataDiskSamples.java new file mode 100644 index 000000000000..f6b95d6e8eb4 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesDetachDataDiskSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.DetachDataDiskProperties; + +/** Samples for VirtualMachines DetachDataDisk. */ +public final class VirtualMachinesDetachDataDiskSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_DetachDataDisk.json + */ + /** + * Sample code: VirtualMachines_DetachDataDisk. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesDetachDataDisk(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .detachDataDisk( + "resourceGroupName", + "{labName}", + "{virtualMachineName}", + new DetachDataDiskProperties() + .withExistingLabDiskId( + "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{virtualMachineName}"), + Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesGetRdpFileContentsSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesGetRdpFileContentsSamples.java new file mode 100644 index 000000000000..c8dff77eee9b --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesGetRdpFileContentsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines GetRdpFileContents. */ +public final class VirtualMachinesGetRdpFileContentsSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_GetRdpFileContents.json + */ + /** + * Sample code: VirtualMachines_GetRdpFileContents. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesGetRdpFileContents( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .getRdpFileContentsWithResponse("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesGetSamples.java new file mode 100644 index 000000000000..e0595dfcfca0 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Get. */ +public final class VirtualMachinesGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Get.json + */ + /** + * Sample code: VirtualMachines_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().getWithResponse("resourceGroupName", "{labName}", "{vmName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesListApplicableSchedulesSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesListApplicableSchedulesSamples.java new file mode 100644 index 000000000000..fc9f05af5781 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesListApplicableSchedulesSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines ListApplicableSchedules. */ +public final class VirtualMachinesListApplicableSchedulesSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_ListApplicableSchedules.json + */ + /** + * Sample code: VirtualMachines_ListApplicableSchedules. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesListApplicableSchedules( + com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .listApplicableSchedulesWithResponse("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesListSamples.java new file mode 100644 index 000000000000..44351579bffd --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines List. */ +public final class VirtualMachinesListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_List.json + */ + /** + * Sample code: VirtualMachines_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesRedeploySamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesRedeploySamples.java new file mode 100644 index 000000000000..b48906e00ad3 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesRedeploySamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Redeploy. */ +public final class VirtualMachinesRedeploySamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Redeploy.json + */ + /** + * Sample code: VirtualMachines_Redeploy. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesRedeploy(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().redeploy("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesResizeSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesResizeSamples.java new file mode 100644 index 000000000000..6f127c934287 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesResizeSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.ResizeLabVirtualMachineProperties; + +/** Samples for VirtualMachines Resize. */ +public final class VirtualMachinesResizeSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Resize.json + */ + /** + * Sample code: VirtualMachines_Resize. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesResize(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualMachines() + .resize( + "resourceGroupName", + "{labName}", + "{vmName}", + new ResizeLabVirtualMachineProperties().withSize("Standard_A4_v2"), + Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesRestartSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesRestartSamples.java new file mode 100644 index 000000000000..4c8a3f838b60 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesRestartSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Restart. */ +public final class VirtualMachinesRestartSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Restart.json + */ + /** + * Sample code: VirtualMachines_Restart. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesRestart(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().restart("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesStartSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesStartSamples.java new file mode 100644 index 000000000000..144e553e1410 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesStartSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Start. */ +public final class VirtualMachinesStartSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Start.json + */ + /** + * Sample code: VirtualMachines_Start. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesStart(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().start("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesStopSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesStopSamples.java new file mode 100644 index 000000000000..bf07c5cbc3f3 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesStopSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Stop. */ +public final class VirtualMachinesStopSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Stop.json + */ + /** + * Sample code: VirtualMachines_Stop. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesStop(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().stop("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesTransferDisksSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesTransferDisksSamples.java new file mode 100644 index 000000000000..1ebe94ed6b25 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesTransferDisksSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines TransferDisks. */ +public final class VirtualMachinesTransferDisksSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_TransferDisks.json + */ + /** + * Sample code: VirtualMachines_TransferDisks. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesTransferDisks(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().transferDisks("resourceGroupName", "{labName}", "{virtualmachineName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesUnClaimSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesUnClaimSamples.java new file mode 100644 index 000000000000..f7182f5e0ef1 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesUnClaimSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines UnClaim. */ +public final class VirtualMachinesUnClaimSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_UnClaim.json + */ + /** + * Sample code: VirtualMachines_UnClaim. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesUnClaim(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualMachines().unClaim("resourceGroupName", "{labName}", "{vmName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesUpdateSamples.java new file mode 100644 index 000000000000..3aa315056e82 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualMachinesUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.LabVirtualMachine; + +/** Samples for VirtualMachines Update. */ +public final class VirtualMachinesUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Update.json + */ + /** + * Sample code: VirtualMachines_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualMachinesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + LabVirtualMachine resource = + manager + .virtualMachines() + .getWithResponse("resourceGroupName", "{labName}", "{vmName}", null, Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksCreateOrUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksCreateOrUpdateSamples.java new file mode 100644 index 000000000000..1286c2e7dfdd --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksCreateOrUpdateSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import java.util.HashMap; +import java.util.Map; + +/** Samples for VirtualNetworks CreateOrUpdate. */ +public final class VirtualNetworksCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_CreateOrUpdate.json + */ + /** + * Sample code: VirtualNetworks_CreateOrUpdate. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualNetworksCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualNetworks() + .define("{virtualNetworkName}") + .withRegion("{location}") + .withExistingLab("resourceGroupName", "{labName}") + .withTags(mapOf("tagName1", "tagValue1")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksDeleteSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksDeleteSamples.java new file mode 100644 index 000000000000..41bc1ac7d80f --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualNetworks Delete. */ +public final class VirtualNetworksDeleteSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_Delete.json + */ + /** + * Sample code: VirtualNetworks_Delete. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualNetworksDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualNetworks().delete("resourceGroupName", "{labName}", "{virtualNetworkName}", Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksGetSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksGetSamples.java new file mode 100644 index 000000000000..9acfc673cd3e --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualNetworks Get. */ +public final class VirtualNetworksGetSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_Get.json + */ + /** + * Sample code: VirtualNetworks_Get. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualNetworksGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager + .virtualNetworks() + .getWithResponse("resourceGroupName", "{labName}", "{virtualNetworkName}", null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksListSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksListSamples.java new file mode 100644 index 000000000000..8ac805a47509 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualNetworks List. */ +public final class VirtualNetworksListSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_List.json + */ + /** + * Sample code: VirtualNetworks_List. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualNetworksList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + manager.virtualNetworks().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE); + } +} diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksUpdateSamples.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksUpdateSamples.java new file mode 100644 index 000000000000..39f595a09029 --- /dev/null +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/samples/java/com/azure/resourcemanager/devtestlabs/generated/VirtualNetworksUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devtestlabs.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.devtestlabs.models.VirtualNetwork; +import java.util.HashMap; +import java.util.Map; + +/** Samples for VirtualNetworks Update. */ +public final class VirtualNetworksUpdateSamples { + /* + * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_Update.json + */ + /** + * Sample code: VirtualNetworks_Update. + * + * @param manager Entry point to DevTestLabsManager. + */ + public static void virtualNetworksUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) { + VirtualNetwork resource = + manager + .virtualNetworks() + .getWithResponse("resourceGroupName", "{labName}", "{virtualNetworkName}", null, Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tagName1", "tagValue1")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +}