From 6ee2794d119f9a27c5636c9e9b5fe769a7597a9c Mon Sep 17 00:00:00 2001 From: "Hong Li(MSFT)" <74638143+v-hongli1@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:33:29 +0800 Subject: [PATCH] mgmt, local generation for Compute GalleryRP 2024-03-03 (#43238) * Code Generation * Change log * Record session --- sdk/resourcemanager/api-specs.json | 2 +- .../CHANGELOG.md | 8 +- .../azure-resourcemanager-compute/assets.json | 2 +- .../fluent/AvailabilitySetsClient.java | 4 +- .../fluent/ComputeManagementClient.java | 21 + ...nVMAccessControlProfileVersionsClient.java | 613 +++++++ ...alleryInVMAccessControlProfilesClient.java | 530 ++++++ .../fluent/SoftDeletedResourcesClient.java | 72 + .../VirtualMachineScaleSetVMsClient.java | 27 +- .../fluent/VirtualMachineScaleSetsClient.java | 20 +- .../compute/fluent/VirtualMachinesClient.java | 27 +- .../fluent/models/AvailabilitySetInner.java | 24 +- .../models/CapacityReservationGroupInner.java | 24 +- .../models/CapacityReservationInner.java | 24 +- .../fluent/models/CloudServiceInner.java | 24 +- .../models/CommunityGalleryImageInner.java | 58 +- .../CommunityGalleryImageProperties.java | 6 +- .../CommunityGalleryImageVersionInner.java | 54 +- .../fluent/models/CommunityGalleryInner.java | 54 +- .../models/DedicatedHostGroupInner.java | 24 +- .../fluent/models/DedicatedHostInner.java | 24 +- .../fluent/models/DiskAccessInner.java | 24 +- .../fluent/models/DiskEncryptionSetInner.java | 24 +- .../compute/fluent/models/DiskInner.java | 24 +- .../fluent/models/DiskRestorePointInner.java | 25 +- .../models/GalleryApplicationInner.java | 24 +- .../GalleryApplicationVersionInner.java | 24 +- .../fluent/models/GalleryImageInner.java | 51 +- .../fluent/models/GalleryImageProperties.java | 34 +- .../models/GalleryImageVersionInner.java | 57 +- .../models/GalleryImageVersionProperties.java | 48 + .../GalleryInVMAccessControlProfileInner.java | 177 ++ ...yInVMAccessControlProfileVersionInner.java | 323 ++++ ...AccessControlProfileVersionProperties.java | 274 +++ .../compute/fluent/models/GalleryInner.java | 56 +- .../GallerySoftDeletedResourceInner.java | 236 +++ .../GallerySoftDeletedResourceProperties.java | 155 ++ .../compute/fluent/models/ImageInner.java | 24 +- .../PrivateEndpointConnectionInner.java | 24 +- .../models/ProximityPlacementGroupInner.java | 24 +- .../models/RestorePointCollectionInner.java | 24 +- .../fluent/models/RestorePointInner.java | 24 +- .../models/RollingUpgradeStatusInfoInner.java | 24 +- .../models/RunCommandDocumentInner.java | 22 +- .../models/SharedGalleryImageInner.java | 34 +- .../models/SharedGalleryImageProperties.java | 6 +- .../SharedGalleryImageVersionInner.java | 30 +- .../fluent/models/SharedGalleryInner.java | 30 +- .../compute/fluent/models/SnapshotInner.java | 24 +- .../models/SshPublicKeyResourceInner.java | 24 +- .../compute/fluent/models/UsageInner.java | 13 +- .../VirtualMachineExtensionImageInner.java | 24 +- .../models/VirtualMachineExtensionInner.java | 25 +- .../models/VirtualMachineImageInner.java | 16 +- .../fluent/models/VirtualMachineInner.java | 24 +- .../models/VirtualMachineRunCommandInner.java | 24 +- .../VirtualMachineScaleSetExtensionInner.java | 1 - .../models/VirtualMachineScaleSetInner.java | 24 +- ...irtualMachineScaleSetVMExtensionInner.java | 1 - .../models/VirtualMachineScaleSetVMInner.java | 24 +- .../models/VirtualMachineUpdateInner.java | 1 - .../AvailabilitySetsClientImpl.java | 10 +- .../CommunityGalleriesClientImpl.java | 4 +- ...mmunityGalleryImageVersionsClientImpl.java | 8 +- .../CommunityGalleryImagesClientImpl.java | 8 +- .../ComputeManagementClientImpl.java | 60 +- .../implementation/GalleriesClientImpl.java | 24 +- .../GalleryApplicationVersionsClientImpl.java | 20 +- .../GalleryApplicationsClientImpl.java | 20 +- .../GalleryImageVersionsClientImpl.java | 20 +- .../GalleryImagesClientImpl.java | 20 +- ...ccessControlProfileVersionsClientImpl.java | 1539 +++++++++++++++++ ...ryInVMAccessControlProfilesClientImpl.java | 1340 ++++++++++++++ .../GallerySharingProfilesClientImpl.java | 4 +- .../SharedGalleriesClientImpl.java | 8 +- .../SharedGalleryImageVersionsClientImpl.java | 8 +- .../SharedGalleryImagesClientImpl.java | 8 +- .../SoftDeletedResourcesClientImpl.java | 326 ++++ .../SshPublicKeysClientImpl.java | 2 +- .../VirtualMachineRunCommandsClientImpl.java | 2 +- ...achineScaleSetVMRunCommandsClientImpl.java | 2 +- .../VirtualMachineScaleSetVMsClientImpl.java | 36 +- .../VirtualMachineScaleSetsClientImpl.java | 26 +- .../VirtualMachinesClientImpl.java | 36 +- .../compute/models/AccessControlRules.java | 199 +++ .../models/AccessControlRulesIdentity.java | 214 +++ .../models/AccessControlRulesMode.java | 57 + .../models/AccessControlRulesPrivilege.java | 166 ++ .../models/AccessControlRulesRole.java | 136 ++ .../AccessControlRulesRoleAssignment.java | 138 ++ .../compute/models/AdditionalReplicaSet.java | 127 ++ .../compute/models/ApiError.java | 48 +- .../compute/models/Architecture.java | 2 +- .../compute/models/AvailabilitySetUpdate.java | 1 - .../CapacityReservationGroupUpdate.java | 1 - ...pacityReservationInstanceViewWithName.java | 7 +- .../models/CapacityReservationUpdate.java | 1 - .../compute/models/DataDisk.java | 11 +- .../models/DataDiskImageEncryption.java | 1 - .../models/DedicatedHostGroupUpdate.java | 1 - .../DedicatedHostInstanceViewWithName.java | 7 +- .../compute/models/DedicatedHostUpdate.java | 1 - .../compute/models/DiskDetachOptionTypes.java | 5 +- .../models/DiskRestorePointAttributes.java | 1 - .../compute/models/EndpointAccess.java | 52 + .../compute/models/EndpointTypes.java | 57 + .../compute/models/ExecutedValidation.java | 182 ++ ...alleryApplicationScriptRebootBehavior.java | 53 + .../models/GalleryApplicationUpdate.java | 25 +- ...ryApplicationVersionPublishingProfile.java | 7 +- ...alleryApplicationVersionSafetyProfile.java | 1 - .../GalleryApplicationVersionUpdate.java | 25 +- .../GalleryArtifactVersionFullSource.java | 1 - .../compute/models/GalleryDataDiskImage.java | 4 +- .../models/GalleryDiskImageSource.java | 1 - .../compute/models/GalleryIdentity.java | 180 ++ .../compute/models/GalleryImageFeature.java | 28 + .../compute/models/GalleryImageUpdate.java | 52 +- .../GalleryImageVersionPublishingProfile.java | 7 +- .../GalleryImageVersionSafetyProfile.java | 33 +- .../models/GalleryImageVersionUpdate.java | 57 +- .../GalleryInVMAccessControlProfileList.java | 141 ++ ...eryInVMAccessControlProfileProperties.java | 193 +++ ...GalleryInVMAccessControlProfileUpdate.java | 164 ++ ...ryInVMAccessControlProfileVersionList.java | 142 ++ ...InVMAccessControlProfileVersionUpdate.java | 306 ++++ .../compute/models/GalleryList.java | 31 + .../compute/models/GalleryOSDiskImage.java | 4 +- .../GalleryResourceProfilePropertiesBase.java | 94 + ...yResourceProfileVersionPropertiesBase.java | 224 +++ .../GallerySoftDeletedResourceList.java | 140 ++ .../compute/models/GalleryUpdate.java | 56 +- .../compute/models/ImageDataDisk.java | 4 +- .../compute/models/ImageOSDisk.java | 4 +- .../compute/models/ImageUpdate.java | 1 - .../compute/models/OSDiskImageEncryption.java | 1 - .../compute/models/OperatingSystemTypes.java | 3 +- .../models/PirSharedGalleryResource.java | 25 +- .../compute/models/PlatformAttribute.java | 97 ++ .../models/ProximityPlacementGroupUpdate.java | 1 - .../models/RequestRateByIntervalInput.java | 16 +- .../compute/models/ResourceIdentityType.java | 5 +- .../models/ResourceWithOptionalLocation.java | 24 +- .../models/RestorePointCollectionUpdate.java | 1 - .../models/SharedGalleryDataDiskImage.java | 1 - .../models/SharedGalleryOSDiskImage.java | 1 - .../models/SoftDeletedArtifactTypes.java | 46 + .../models/SshPublicKeyUpdateResource.java | 1 - .../compute/models/StorageAccountType.java | 5 + .../compute/models/TargetRegion.java | 35 + .../models/ThrottledRequestsInput.java | 18 +- .../models/UpdateResourceDefinition.java | 24 +- .../compute/models/UserArtifactSettings.java | 34 + .../compute/models/ValidationStatus.java | 56 + .../compute/models/ValidationsProfile.java | 164 ++ .../models/VirtualMachineExtensionUpdate.java | 1 - .../VirtualMachineRunCommandUpdate.java | 1 - ...VirtualMachineScaleSetExtensionUpdate.java | 1 - ...rtualMachineScaleSetReimageParameters.java | 4 +- .../models/VirtualMachineScaleSetUpdate.java | 1 - ...rtualMachineScaleSetVMExtensionUpdate.java | 1 - ...ualMachineScaleSetVMReimageParameters.java | 4 +- .../proxy-config.json | 2 +- .../CommunityGalleriesGetSamples.java | 2 +- ...mmunityGalleryImageVersionsGetSamples.java | 2 +- ...munityGalleryImageVersionsListSamples.java | 2 +- .../CommunityGalleryImagesGetSamples.java | 2 +- .../CommunityGalleryImagesListSamples.java | 2 +- .../GalleriesCreateOrUpdateSamples.java | 49 +- .../generated/GalleriesDeleteSamples.java | 2 +- .../GalleriesGetByResourceGroupSamples.java | 28 +- .../GalleriesListByResourceGroupSamples.java | 2 +- .../generated/GalleriesListSamples.java | 2 +- .../generated/GalleriesUpdateSamples.java | 2 +- ...licationVersionsCreateOrUpdateSamples.java | 2 +- ...lleryApplicationVersionsDeleteSamples.java | 2 +- .../GalleryApplicationVersionsGetSamples.java | 4 +- ...rsionsListByGalleryApplicationSamples.java | 2 +- ...lleryApplicationVersionsUpdateSamples.java | 2 +- ...leryApplicationsCreateOrUpdateSamples.java | 2 +- .../GalleryApplicationsDeleteSamples.java | 2 +- .../GalleryApplicationsGetSamples.java | 2 +- ...lleryApplicationsListByGallerySamples.java | 2 +- .../GalleryApplicationsUpdateSamples.java | 2 +- ...eryImageVersionsCreateOrUpdateSamples.java | 104 +- .../GalleryImageVersionsDeleteSamples.java | 2 +- .../GalleryImageVersionsGetSamples.java | 49 +- ...mageVersionsListByGalleryImageSamples.java | 2 +- .../GalleryImageVersionsUpdateSamples.java | 25 +- .../GalleryImagesCreateOrUpdateSamples.java | 2 +- .../generated/GalleryImagesDeleteSamples.java | 2 +- .../generated/GalleryImagesGetSamples.java | 2 +- .../GalleryImagesListByGallerySamples.java | 2 +- .../generated/GalleryImagesUpdateSamples.java | 33 +- ...lProfileVersionsCreateOrUpdateSamples.java | 75 + ...ssControlProfileVersionsDeleteSamples.java | 30 + ...ccessControlProfileVersionsGetSamples.java | 30 + ...alleryInVMAccessControlProfileSamples.java | 30 + ...ssControlProfileVersionsUpdateSamples.java | 41 + ...sControlProfilesCreateOrUpdateSamples.java | 39 + ...nVMAccessControlProfilesDeleteSamples.java | 29 + ...ryInVMAccessControlProfilesGetSamples.java | 29 + ...ssControlProfilesListByGallerySamples.java | 29 + ...nVMAccessControlProfilesUpdateSamples.java | 37 + .../GallerySharingProfileUpdateSamples.java | 6 +- .../generated/SharedGalleriesGetSamples.java | 2 +- .../generated/SharedGalleriesListSamples.java | 2 +- .../SharedGalleryImageVersionsGetSamples.java | 2 +- ...SharedGalleryImageVersionsListSamples.java | 2 +- .../SharedGalleryImagesGetSamples.java | 2 +- .../SharedGalleryImagesListSamples.java | 2 +- ...etedResourceListByArtifactNameSamples.java | 30 + ...irtualMachineScaleSetVMsUpdateSamples.java | 8 +- ...MachineScaleSetsCreateOrUpdateSamples.java | 42 +- .../VirtualMachineScaleSetsUpdateSamples.java | 4 +- .../VirtualMachinesCreateOrUpdateSamples.java | 8 +- .../VirtualMachinesInstallPatchesSamples.java | 2 +- 217 files changed, 11086 insertions(+), 921 deletions(-) create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryInVMAccessControlProfileVersionsClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryInVMAccessControlProfilesClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SoftDeletedResourcesClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileVersionInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileVersionProperties.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GallerySoftDeletedResourceInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GallerySoftDeletedResourceProperties.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryInVMAccessControlProfileVersionsClientImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryInVMAccessControlProfilesClientImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SoftDeletedResourcesClientImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRules.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesIdentity.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesMode.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesPrivilege.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesRole.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesRoleAssignment.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AdditionalReplicaSet.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/EndpointAccess.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/EndpointTypes.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ExecutedValidation.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationScriptRebootBehavior.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryIdentity.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileList.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileProperties.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileUpdate.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileVersionList.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileVersionUpdate.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryResourceProfilePropertiesBase.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryResourceProfileVersionPropertiesBase.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GallerySoftDeletedResourceList.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/PlatformAttribute.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SoftDeletedArtifactTypes.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ValidationStatus.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ValidationsProfile.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsCreateOrUpdateSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsDeleteSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsGetSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsUpdateSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesCreateOrUpdateSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesDeleteSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesGetSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesListByGallerySamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesUpdateSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SoftDeletedResourceListByArtifactNameSamples.java diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 7e5553c3b0005..c1acd123f8aee 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -40,7 +40,7 @@ "dir": "azure-resourcemanager-compute", "source": "specification/compute/resource-manager/readme.md", "package": "com.azure.resourcemanager.compute", - "args": "--tag=package-2024-07-01 --modelerfour.lenient-model-deduplication=true --rename-model=UserAssignedIdentitiesValue:VirtualMachineIdentityUserAssignedIdentities,VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue:VirtualMachineScaleSetIdentityUserAssignedIdentities --preserve-model=AvailabilitySetSkuTypes --remove-inner=StorageProfile" + "args": "--tag=package-2024-10-01 --modelerfour.lenient-model-deduplication=true --rename-model=UserAssignedIdentitiesValue:VirtualMachineIdentityUserAssignedIdentities,VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue:VirtualMachineScaleSetIdentityUserAssignedIdentities --preserve-model=AvailabilitySetSkuTypes --remove-inner=StorageProfile" }, "compute-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-compute", diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-compute/CHANGELOG.md index bdd5204b9a048..7fc683d94eb94 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-compute/CHANGELOG.md @@ -2,13 +2,11 @@ ## 2.46.0-beta.1 (Unreleased) -### Features Added - -### Breaking Changes +### Other Changes -### Bugs Fixed +#### Dependency Updates -### Other Changes +- Updated `api-version` of GalleryRP to `2024-03-03`. ## 2.45.0 (2024-11-28) diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/assets.json b/sdk/resourcemanager/azure-resourcemanager-compute/assets.json index e9e3bfbfd90b7..c23eab88d6d65 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/assets.json +++ b/sdk/resourcemanager/azure-resourcemanager-compute/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/resourcemanager/azure-resourcemanager-compute", - "Tag": "java/resourcemanager/azure-resourcemanager-compute_83a099fdb2" + "Tag": "java/resourcemanager/azure-resourcemanager-compute_7fa2d65716" } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java index b204021818eee..60e767c0a696e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java @@ -263,7 +263,7 @@ Response getByResourceGroupWithResponse(String resourceGro /** * Lists all availability sets in a subscription. * - * @param expand The expand expression to apply to the operation. Allowed values are 'instanceView'. + * @param expand The expand expression to apply to the operation. Allowed values are 'virtualMachines/$ref'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -295,7 +295,7 @@ Response getByResourceGroupWithResponse(String resourceGro /** * Lists all availability sets in a subscription. * - * @param expand The expand expression to apply to the operation. Allowed values are 'instanceView'. + * @param expand The expand expression to apply to the operation. Allowed values are 'virtualMachines/$ref'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ComputeManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ComputeManagementClient.java index f74fe540f1679..3eb7b2e9ccf79 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ComputeManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ComputeManagementClient.java @@ -299,6 +299,13 @@ public interface ComputeManagementClient { */ GalleryApplicationVersionsClient getGalleryApplicationVersions(); + /** + * Gets the SoftDeletedResourcesClient object to access its operations. + * + * @return the SoftDeletedResourcesClient object. + */ + SoftDeletedResourcesClient getSoftDeletedResources(); + /** * Gets the GallerySharingProfilesClient object to access its operations. * @@ -306,6 +313,20 @@ public interface ComputeManagementClient { */ GallerySharingProfilesClient getGallerySharingProfiles(); + /** + * Gets the GalleryInVMAccessControlProfilesClient object to access its operations. + * + * @return the GalleryInVMAccessControlProfilesClient object. + */ + GalleryInVMAccessControlProfilesClient getGalleryInVMAccessControlProfiles(); + + /** + * Gets the GalleryInVMAccessControlProfileVersionsClient object to access its operations. + * + * @return the GalleryInVMAccessControlProfileVersionsClient object. + */ + GalleryInVMAccessControlProfileVersionsClient getGalleryInVMAccessControlProfileVersions(); + /** * Gets the SharedGalleriesClient object to access its operations. * diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryInVMAccessControlProfileVersionsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryInVMAccessControlProfileVersionsClient.java new file mode 100644 index 0000000000000..22fa0fb7c8ae6 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryInVMAccessControlProfileVersionsClient.java @@ -0,0 +1,613 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.compute.fluent.models.GalleryInVMAccessControlProfileVersionInner; +import com.azure.resourcemanager.compute.models.GalleryInVMAccessControlProfileVersionUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * GalleryInVMAccessControlProfileVersionsClient. + */ +public interface GalleryInVMAccessControlProfileVersionsClient { + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion); + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, GalleryInVMAccessControlProfileVersionInner> + beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion); + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, GalleryInVMAccessControlProfileVersionInner> + beginCreateOrUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion); + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, GalleryInVMAccessControlProfileVersionInner> + beginCreateOrUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion, Context context); + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion); + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GalleryInVMAccessControlProfileVersionInner createOrUpdate(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion); + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GalleryInVMAccessControlProfileVersionInner createOrUpdate(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion, Context context); + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion); + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, GalleryInVMAccessControlProfileVersionInner> + beginUpdateAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion); + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, GalleryInVMAccessControlProfileVersionInner> + beginUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion); + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, GalleryInVMAccessControlProfileVersionInner> + beginUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion, Context context); + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion); + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GalleryInVMAccessControlProfileVersionInner update(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion); + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GalleryInVMAccessControlProfileVersionInner update(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion, Context context); + + /** + * Retrieves information about a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, + String galleryName, String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName); + + /** + * Retrieves information about a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName); + + /** + * Retrieves information about a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * retrieved. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, Context context); + + /** + * Retrieves information about a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GalleryInVMAccessControlProfileVersionInner get(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName); + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName); + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName); + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName); + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, Context context); + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName); + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName); + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, Context context); + + /** + * List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile from which the + * inVMAccessControlProfile versions are to be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfile Versions operation response as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByGalleryInVMAccessControlProfileAsync( + String resourceGroupName, String galleryName, String inVMAccessControlProfileName); + + /** + * List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile from which the + * inVMAccessControlProfile versions are to be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfile Versions operation response as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByGalleryInVMAccessControlProfile( + String resourceGroupName, String galleryName, String inVMAccessControlProfileName); + + /** + * List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile from which the + * inVMAccessControlProfile versions are to be listed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfile Versions operation response as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByGalleryInVMAccessControlProfile( + String resourceGroupName, String galleryName, String inVMAccessControlProfileName, Context context); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryInVMAccessControlProfilesClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryInVMAccessControlProfilesClient.java new file mode 100644 index 0000000000000..63cf741ff44db --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryInVMAccessControlProfilesClient.java @@ -0,0 +1,530 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.compute.fluent.models.GalleryInVMAccessControlProfileInner; +import com.azure.resourcemanager.compute.models.GalleryInVMAccessControlProfileUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in GalleryInVMAccessControlProfilesClient. + */ +public interface GalleryInVMAccessControlProfilesClient { + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile); + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, GalleryInVMAccessControlProfileInner> + beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile); + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, GalleryInVMAccessControlProfileInner> + beginCreateOrUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile); + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, GalleryInVMAccessControlProfileInner> + beginCreateOrUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile, Context context); + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile); + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GalleryInVMAccessControlProfileInner createOrUpdate(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile); + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GalleryInVMAccessControlProfileInner createOrUpdate(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile, + Context context); + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile); + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, GalleryInVMAccessControlProfileInner> beginUpdateAsync( + String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile); + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, GalleryInVMAccessControlProfileInner> beginUpdate( + String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile); + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, GalleryInVMAccessControlProfileInner> beginUpdate( + String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile, Context context); + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile); + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GalleryInVMAccessControlProfileInner update(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile); + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GalleryInVMAccessControlProfileInner update(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile, + Context context); + + /** + * Retrieves information about a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * retrieved. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, + String galleryName, String inVMAccessControlProfileName); + + /** + * Retrieves information about a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * retrieved. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName); + + /** + * Retrieves information about a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * retrieved. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be retrieved. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, Context context); + + /** + * Retrieves information about a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * retrieved. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GalleryInVMAccessControlProfileInner get(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName); + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName); + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName); + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName); + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, Context context); + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName); + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String galleryName, String inVMAccessControlProfileName); + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, Context context); + + /** + * List gallery inVMAccessControlProfiles in a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * listed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfiles operation response as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByGalleryAsync(String resourceGroupName, String galleryName); + + /** + * List gallery inVMAccessControlProfiles in a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * listed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfiles operation response as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByGallery(String resourceGroupName, String galleryName); + + /** + * List gallery inVMAccessControlProfiles in a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * listed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfiles operation response as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByGallery(String resourceGroupName, String galleryName, + Context context); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SoftDeletedResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SoftDeletedResourcesClient.java new file mode 100644 index 0000000000000..89d131fe05e1b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SoftDeletedResourcesClient.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.compute.fluent.models.GallerySoftDeletedResourceInner; + +/** + * An instance of this class provides access to all the operations defined in SoftDeletedResourcesClient. + */ +public interface SoftDeletedResourcesClient { + /** + * List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an + * image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Gallery in which the soft-deleted resources resides. + * @param artifactType The type of the artifact to be listed, such as gallery image version. + * @param artifactName The artifact name to be listed. If artifact type is Images, then the artifact name should be + * the gallery image name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Soft-deleted Resources operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByArtifactNameAsync(String resourceGroupName, String galleryName, + String artifactType, String artifactName); + + /** + * List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an + * image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Gallery in which the soft-deleted resources resides. + * @param artifactType The type of the artifact to be listed, such as gallery image version. + * @param artifactName The artifact name to be listed. If artifact type is Images, then the artifact name should be + * the gallery image name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Soft-deleted Resources operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByArtifactName(String resourceGroupName, String galleryName, + String artifactType, String artifactName); + + /** + * List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an + * image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Gallery in which the soft-deleted resources resides. + * @param artifactType The type of the artifact to be listed, such as gallery image version. + * @param artifactName The artifact name to be listed. If artifact type is Images, then the artifact name should be + * the gallery image name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Soft-deleted Resources operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByArtifactName(String resourceGroupName, String galleryName, + String artifactType, String artifactName, Context context); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java index 21789ae7bd912..958890fb489db 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java @@ -988,7 +988,8 @@ PagedIterable list(String resourceGroupName, Stri /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1006,7 +1007,8 @@ Mono>> powerOffWithResponseAsync(String resourceGroupN /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1024,7 +1026,8 @@ PollerFlux, Void> beginPowerOffAsync(String resourceGroupName, /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1040,7 +1043,8 @@ PollerFlux, Void> beginPowerOffAsync(String resourceGroupName, /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1056,7 +1060,8 @@ SyncPoller, Void> beginPowerOff(String resourceGroupName, Strin /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1075,7 +1080,8 @@ SyncPoller, Void> beginPowerOff(String resourceGroupName, Strin /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1092,7 +1098,8 @@ SyncPoller, Void> beginPowerOff(String resourceGroupName, Strin /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1107,7 +1114,8 @@ SyncPoller, Void> beginPowerOff(String resourceGroupName, Strin /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1121,7 +1129,8 @@ SyncPoller, Void> beginPowerOff(String resourceGroupName, Strin /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java index 11bd6149f2d6d..e56d087b75a8a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java @@ -20,11 +20,11 @@ import com.azure.resourcemanager.compute.fluent.models.VirtualMachineScaleSetSkuInner; import com.azure.resourcemanager.compute.models.ExpandTypesForGetVMScaleSets; import com.azure.resourcemanager.compute.models.OrchestrationServiceStateInput; +import com.azure.resourcemanager.compute.models.VMScaleSetConvertToSinglePlacementGroupInput; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetReimageParameters; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetUpdate; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMInstanceIDs; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMInstanceRequiredIDs; -import com.azure.resourcemanager.compute.models.VMScaleSetConvertToSinglePlacementGroupInput; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; @@ -1100,6 +1100,8 @@ PagedIterable getOSUpgradeHistory(Str /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1118,6 +1120,8 @@ Mono>> powerOffWithResponseAsync(String resourceGroupN /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1136,6 +1140,8 @@ PollerFlux, Void> beginPowerOffAsync(String resourceGroupName, /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1150,6 +1156,8 @@ PollerFlux, Void> beginPowerOffAsync(String resourceGroupName, /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1164,6 +1172,8 @@ PollerFlux, Void> beginPowerOffAsync(String resourceGroupName, /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1183,6 +1193,8 @@ SyncPoller, Void> beginPowerOff(String resourceGroupName, Strin /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1201,6 +1213,8 @@ Mono powerOffAsync(String resourceGroupName, String vmScaleSetName, Boolea /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1215,6 +1229,8 @@ Mono powerOffAsync(String resourceGroupName, String vmScaleSetName, Boolea /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -1228,6 +1244,8 @@ Mono powerOffAsync(String resourceGroupName, String vmScaleSetName, Boolea /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java index 27b79aabcba22..f5cb5aae0d2eb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java @@ -1229,7 +1229,8 @@ PagedIterable list(String statusOnly, String filter, Expand /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -1246,7 +1247,8 @@ Mono>> powerOffWithResponseAsync(String resourceGroupN /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -1263,7 +1265,8 @@ PollerFlux, Void> beginPowerOffAsync(String resourceGroupName, /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -1277,7 +1280,8 @@ PollerFlux, Void> beginPowerOffAsync(String resourceGroupName, /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -1291,7 +1295,8 @@ PollerFlux, Void> beginPowerOffAsync(String resourceGroupName, /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -1309,7 +1314,8 @@ SyncPoller, Void> beginPowerOff(String resourceGroupName, Strin /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -1325,7 +1331,8 @@ SyncPoller, Void> beginPowerOff(String resourceGroupName, Strin /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -1339,7 +1346,8 @@ SyncPoller, Void> beginPowerOff(String resourceGroupName, Strin /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -1352,7 +1360,8 @@ SyncPoller, Void> beginPowerOff(String resourceGroupName, Strin /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/AvailabilitySetInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/AvailabilitySetInner.java index 7826a8b8763c4..4a3b27009c465 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/AvailabilitySetInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/AvailabilitySetInner.java @@ -41,9 +41,9 @@ public final class AvailabilitySetInner extends Resource { private Sku sku; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -51,9 +51,9 @@ public final class AvailabilitySetInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of AvailabilitySetInner class. @@ -95,13 +95,13 @@ public AvailabilitySetInner withSku(Sku sku) { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -115,13 +115,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationGroupInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationGroupInner.java index 304fa0ea8c4c5..f0764dfc24dba 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationGroupInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationGroupInner.java @@ -36,9 +36,9 @@ public final class CapacityReservationGroupInner extends Resource { private List zones; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -46,9 +46,9 @@ public final class CapacityReservationGroupInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of CapacityReservationGroupInner class. @@ -90,13 +90,13 @@ public CapacityReservationGroupInner withZones(List zones) { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -110,13 +110,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationInner.java index 7f3233ab27ede..7771c80b0ad6a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationInner.java @@ -45,9 +45,9 @@ public final class CapacityReservationInner extends Resource { private List zones; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -55,9 +55,9 @@ public final class CapacityReservationInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of CapacityReservationInner class. @@ -127,13 +127,13 @@ public CapacityReservationInner withZones(List zones) { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -147,13 +147,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CloudServiceInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CloudServiceInner.java index cc0fd4ea03581..68d95b0f081be 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CloudServiceInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CloudServiceInner.java @@ -37,9 +37,9 @@ public final class CloudServiceInner extends Resource { private List zones; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -47,9 +47,9 @@ public final class CloudServiceInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of CloudServiceInner class. @@ -120,13 +120,13 @@ public CloudServiceInner withZones(List zones) { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -140,13 +140,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageInner.java index a0640d52033ac..194dd5571e218 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageInner.java @@ -34,24 +34,24 @@ public final class CommunityGalleryImageInner extends PirCommunityGalleryResourc private CommunityGalleryImageProperties innerProperties; /* - * Resource name + * The identifier information of community gallery. */ - private String name; + private CommunityGalleryIdentifier innerIdentifier; /* - * Resource location + * Resource type */ - private String location; + private String type; /* - * Resource type + * Resource location */ - private String type; + private String location; /* - * The identifier information of community gallery. + * Resource name */ - private CommunityGalleryIdentifier innerIdentifier; + private String name; /** * Creates an instance of CommunityGalleryImageInner class. @@ -69,42 +69,42 @@ private CommunityGalleryImageProperties innerProperties() { } /** - * Get the name property: Resource name. + * Get the innerIdentifier property: The identifier information of community gallery. * - * @return the name value. + * @return the innerIdentifier value. */ - @Override - public String name() { - return this.name; + private CommunityGalleryIdentifier innerIdentifier() { + return this.innerIdentifier; } /** - * Get the location property: Resource location. + * Get the type property: Resource type. * - * @return the location value. + * @return the type value. */ @Override - public String location() { - return this.location; + public String type() { + return this.type; } /** - * Get the type property: Resource type. + * Get the location property: Resource location. * - * @return the type value. + * @return the location value. */ @Override - public String type() { - return this.type; + public String location() { + return this.location; } /** - * Get the innerIdentifier property: The identifier information of community gallery. + * Get the name property: Resource name. * - * @return the innerIdentifier value. + * @return the name value. */ - private CommunityGalleryIdentifier innerIdentifier() { - return this.innerIdentifier; + @Override + public String name() { + return this.name; } /** @@ -348,7 +348,7 @@ public CommunityGalleryImageInner withPurchasePlan(ImagePurchasePlan purchasePla } /** - * Get the architecture property: The architecture of the image. Applicable to OS disks only. + * Get the architecture property: CPU architecture supported by an OS disk. * * @return the architecture value. */ @@ -357,7 +357,7 @@ public Architecture architecture() { } /** - * Set the architecture property: The architecture of the image. Applicable to OS disks only. + * Set the architecture property: CPU architecture supported by an OS disk. * * @param architecture the architecture value to set. * @return the CommunityGalleryImageInner object itself. @@ -469,10 +469,12 @@ public CommunityGalleryImageInner withArtifactTags(Map artifactT */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } + if (innerIdentifier() != null) { + innerIdentifier().validate(); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageProperties.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageProperties.java index 819539c367589..199848b6f978a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageProperties.java @@ -81,7 +81,7 @@ public final class CommunityGalleryImageProperties implements JsonSerializable ar */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } + if (innerIdentifier() != null) { + innerIdentifier().validate(); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryInner.java index 5299bbb7d761f..cf0ca796257f9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryInner.java @@ -24,24 +24,24 @@ public final class CommunityGalleryInner extends PirCommunityGalleryResource { private CommunityGalleryProperties innerProperties; /* - * Resource name + * The identifier information of community gallery. */ - private String name; + private CommunityGalleryIdentifier innerIdentifier; /* - * Resource location + * Resource type */ - private String location; + private String type; /* - * Resource type + * Resource location */ - private String type; + private String location; /* - * The identifier information of community gallery. + * Resource name */ - private CommunityGalleryIdentifier innerIdentifier; + private String name; /** * Creates an instance of CommunityGalleryInner class. @@ -59,42 +59,42 @@ private CommunityGalleryProperties innerProperties() { } /** - * Get the name property: Resource name. + * Get the innerIdentifier property: The identifier information of community gallery. * - * @return the name value. + * @return the innerIdentifier value. */ - @Override - public String name() { - return this.name; + private CommunityGalleryIdentifier innerIdentifier() { + return this.innerIdentifier; } /** - * Get the location property: Resource location. + * Get the type property: Resource type. * - * @return the location value. + * @return the type value. */ @Override - public String location() { - return this.location; + public String type() { + return this.type; } /** - * Get the type property: Resource type. + * Get the location property: Resource location. * - * @return the type value. + * @return the location value. */ @Override - public String type() { - return this.type; + public String location() { + return this.location; } /** - * Get the innerIdentifier property: The identifier information of community gallery. + * Get the name property: Resource name. * - * @return the innerIdentifier value. + * @return the name value. */ - private CommunityGalleryIdentifier innerIdentifier() { - return this.innerIdentifier; + @Override + public String name() { + return this.name; } /** @@ -196,10 +196,12 @@ public CommunityGalleryInner withCommunityMetadata(CommunityGalleryMetadata comm */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } + if (innerIdentifier() != null) { + innerIdentifier().validate(); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostGroupInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostGroupInner.java index c5be7b9e28c5c..67164a23f7852 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostGroupInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostGroupInner.java @@ -36,9 +36,9 @@ public final class DedicatedHostGroupInner extends Resource { private List zones; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -46,9 +46,9 @@ public final class DedicatedHostGroupInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DedicatedHostGroupInner class. @@ -90,13 +90,13 @@ public DedicatedHostGroupInner withZones(List zones) { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -110,13 +110,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostInner.java index d3220fb6b3a53..0b0a29c29ddcb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostInner.java @@ -36,9 +36,9 @@ public final class DedicatedHostInner extends Resource { private Sku sku; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -46,9 +46,9 @@ public final class DedicatedHostInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DedicatedHostInner class. @@ -88,13 +88,13 @@ public DedicatedHostInner withSku(Sku sku) { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -108,13 +108,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskAccessInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskAccessInner.java index 0c28131883358..cc06ecf553886 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskAccessInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskAccessInner.java @@ -31,9 +31,9 @@ public final class DiskAccessInner extends Resource { private ExtendedLocation extendedLocation; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -41,9 +41,9 @@ public final class DiskAccessInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DiskAccessInner class. @@ -83,13 +83,13 @@ public DiskAccessInner withExtendedLocation(ExtendedLocation extendedLocation) { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -103,13 +103,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskEncryptionSetInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskEncryptionSetInner.java index dca1c0b4677ef..dafff9569ae5c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskEncryptionSetInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskEncryptionSetInner.java @@ -35,9 +35,9 @@ public final class DiskEncryptionSetInner extends Resource { private EncryptionSetProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -45,9 +45,9 @@ public final class DiskEncryptionSetInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DiskEncryptionSetInner class. @@ -87,13 +87,13 @@ private EncryptionSetProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -107,13 +107,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskInner.java index 1bb375e814996..03591aa1d5b1d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskInner.java @@ -68,9 +68,9 @@ public final class DiskInner extends Resource { private DiskProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -78,9 +78,9 @@ public final class DiskInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DiskInner class. @@ -181,13 +181,13 @@ private DiskProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -201,13 +201,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskRestorePointInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskRestorePointInner.java index dba187c9bc35d..04fe31207ebf7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskRestorePointInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskRestorePointInner.java @@ -31,9 +31,9 @@ public final class DiskRestorePointInner extends ProxyOnlyResource { private DiskRestorePointProperties innerProperties; /* - * Resource Id + * Resource type */ - private String id; + private String type; /* * Resource name @@ -41,9 +41,9 @@ public final class DiskRestorePointInner extends ProxyOnlyResource { private String name; /* - * Resource type + * Resource Id */ - private String type; + private String id; /** * Creates an instance of DiskRestorePointInner class. @@ -61,13 +61,13 @@ private DiskRestorePointProperties innerProperties() { } /** - * Get the id property: Resource Id. + * Get the type property: Resource type. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -81,13 +81,13 @@ public String name() { } /** - * Get the type property: Resource type. + * Get the id property: Resource Id. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -393,7 +393,6 @@ public Integer logicalSectorSize() { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationInner.java index 72a5e3f6b5802..7d11c8831060c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationInner.java @@ -27,9 +27,9 @@ public final class GalleryApplicationInner extends Resource { private GalleryApplicationProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -37,9 +37,9 @@ public final class GalleryApplicationInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of GalleryApplicationInner class. @@ -57,13 +57,13 @@ private GalleryApplicationProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -77,13 +77,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationVersionInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationVersionInner.java index bf4aa0558f2c8..c3cca0a704462 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationVersionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationVersionInner.java @@ -27,9 +27,9 @@ public final class GalleryApplicationVersionInner extends Resource { private GalleryApplicationVersionProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -37,9 +37,9 @@ public final class GalleryApplicationVersionInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of GalleryApplicationVersionInner class. @@ -57,13 +57,13 @@ private GalleryApplicationVersionProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -77,13 +77,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageInner.java index db2091390a63c..f95cf495296f1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageInner.java @@ -35,9 +35,9 @@ public final class GalleryImageInner extends Resource { private GalleryImageProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -45,9 +45,9 @@ public final class GalleryImageInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of GalleryImageInner class. @@ -65,13 +65,13 @@ private GalleryImageProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -85,13 +85,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -433,7 +433,7 @@ public GalleryImageInner withFeatures(List features) { } /** - * Get the architecture property: The architecture of the image. Applicable to OS disks only. + * Get the architecture property: CPU architecture supported by an OS disk. * * @return the architecture value. */ @@ -442,7 +442,7 @@ public Architecture architecture() { } /** - * Set the architecture property: The architecture of the image. Applicable to OS disks only. + * Set the architecture property: CPU architecture supported by an OS disk. * * @param architecture the architecture value to set. * @return the GalleryImageInner object itself. @@ -455,6 +455,29 @@ public GalleryImageInner withArchitecture(Architecture architecture) { return this; } + /** + * Get the allowUpdateImage property: Optional. Must be set to true if the gallery image features are being updated. + * + * @return the allowUpdateImage value. + */ + public Boolean allowUpdateImage() { + return this.innerProperties() == null ? null : this.innerProperties().allowUpdateImage(); + } + + /** + * Set the allowUpdateImage property: Optional. Must be set to true if the gallery image features are being updated. + * + * @param allowUpdateImage the allowUpdateImage value to set. + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withAllowUpdateImage(Boolean allowUpdateImage) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryImageProperties(); + } + this.innerProperties().withAllowUpdateImage(allowUpdateImage); + return this; + } + /** * Validates the instance. * diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageProperties.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageProperties.java index 59c9865f041c1..7271f117c1b6c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageProperties.java @@ -106,10 +106,15 @@ public final class GalleryImageProperties implements JsonSerializable features; /* - * The architecture of the image. Applicable to OS disks only. + * CPU architecture supported by an OS disk. */ private Architecture architecture; + /* + * Optional. Must be set to true if the gallery image features are being updated. + */ + private Boolean allowUpdateImage; + /** * Creates an instance of GalleryImageProperties class. */ @@ -398,7 +403,7 @@ public GalleryImageProperties withFeatures(List features) { } /** - * Get the architecture property: The architecture of the image. Applicable to OS disks only. + * Get the architecture property: CPU architecture supported by an OS disk. * * @return the architecture value. */ @@ -407,7 +412,7 @@ public Architecture architecture() { } /** - * Set the architecture property: The architecture of the image. Applicable to OS disks only. + * Set the architecture property: CPU architecture supported by an OS disk. * * @param architecture the architecture value to set. * @return the GalleryImageProperties object itself. @@ -417,6 +422,26 @@ public GalleryImageProperties withArchitecture(Architecture architecture) { return this; } + /** + * Get the allowUpdateImage property: Optional. Must be set to true if the gallery image features are being updated. + * + * @return the allowUpdateImage value. + */ + public Boolean allowUpdateImage() { + return this.allowUpdateImage; + } + + /** + * Set the allowUpdateImage property: Optional. Must be set to true if the gallery image features are being updated. + * + * @param allowUpdateImage the allowUpdateImage value to set. + * @return the GalleryImageProperties object itself. + */ + public GalleryImageProperties withAllowUpdateImage(Boolean allowUpdateImage) { + this.allowUpdateImage = allowUpdateImage; + return this; + } + /** * Validates the instance. * @@ -476,6 +501,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("purchasePlan", this.purchasePlan); jsonWriter.writeArrayField("features", this.features, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("architecture", this.architecture == null ? null : this.architecture.toString()); + jsonWriter.writeBooleanField("allowUpdateImage", this.allowUpdateImage); return jsonWriter.writeEndObject(); } @@ -531,6 +557,8 @@ public static GalleryImageProperties fromJson(JsonReader jsonReader) throws IOEx deserializedGalleryImageProperties.features = features; } else if ("architecture".equals(fieldName)) { deserializedGalleryImageProperties.architecture = Architecture.fromString(reader.getString()); + } else if ("allowUpdateImage".equals(fieldName)) { + deserializedGalleryImageProperties.allowUpdateImage = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageVersionInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageVersionInner.java index 62160b3654d5a..e777041257107 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageVersionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageVersionInner.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.compute.models.GalleryProvisioningState; import com.azure.resourcemanager.compute.models.ImageVersionSecurityProfile; import com.azure.resourcemanager.compute.models.ReplicationStatus; +import com.azure.resourcemanager.compute.models.ValidationsProfile; import java.io.IOException; import java.util.Map; @@ -29,9 +30,9 @@ public final class GalleryImageVersionInner extends Resource { private GalleryImageVersionProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +40,9 @@ public final class GalleryImageVersionInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of GalleryImageVersionInner class. @@ -59,13 +60,13 @@ private GalleryImageVersionProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -79,13 +80,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -216,6 +217,38 @@ public GalleryImageVersionInner withSecurityProfile(ImageVersionSecurityProfile return this; } + /** + * Get the restore property: Indicates if this is a soft-delete resource restoration request. + * + * @return the restore value. + */ + public Boolean restore() { + return this.innerProperties() == null ? null : this.innerProperties().restore(); + } + + /** + * Set the restore property: Indicates if this is a soft-delete resource restoration request. + * + * @param restore the restore value to set. + * @return the GalleryImageVersionInner object itself. + */ + public GalleryImageVersionInner withRestore(Boolean restore) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryImageVersionProperties(); + } + this.innerProperties().withRestore(restore); + return this; + } + + /** + * Get the validationsProfile property: This is the validations profile of a Gallery Image Version. + * + * @return the validationsProfile value. + */ + public ValidationsProfile validationsProfile() { + return this.innerProperties() == null ? null : this.innerProperties().validationsProfile(); + } + /** * Validates the instance. * diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageVersionProperties.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageVersionProperties.java index 164d627ca2d18..3e00e009f4a63 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageVersionProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageVersionProperties.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.compute.models.GalleryProvisioningState; import com.azure.resourcemanager.compute.models.ImageVersionSecurityProfile; import com.azure.resourcemanager.compute.models.ReplicationStatus; +import com.azure.resourcemanager.compute.models.ValidationsProfile; import java.io.IOException; /** @@ -53,6 +54,16 @@ public final class GalleryImageVersionProperties implements JsonSerializable tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GalleryInVMAccessControlProfileInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GalleryInVMAccessControlProfileInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GalleryInVMAccessControlProfileInner. + */ + public static GalleryInVMAccessControlProfileInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GalleryInVMAccessControlProfileInner deserializedGalleryInVMAccessControlProfileInner + = new GalleryInVMAccessControlProfileInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedGalleryInVMAccessControlProfileInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileInner.properties + = GalleryInVMAccessControlProfileProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGalleryInVMAccessControlProfileInner; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileVersionInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileVersionInner.java new file mode 100644 index 0000000000000..e24d158f22d5c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileVersionInner.java @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.compute.models.AccessControlRules; +import com.azure.resourcemanager.compute.models.AccessControlRulesMode; +import com.azure.resourcemanager.compute.models.EndpointAccess; +import com.azure.resourcemanager.compute.models.GalleryProvisioningState; +import com.azure.resourcemanager.compute.models.ReplicationStatus; +import com.azure.resourcemanager.compute.models.TargetRegion; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** + * Specifies information about the gallery inVMAccessControlProfile version that you want to create or update. + */ +@Fluent +public final class GalleryInVMAccessControlProfileVersionInner extends Resource { + /* + * Describes the properties of an inVMAccessControlProfile version. + */ + private GalleryInVMAccessControlProfileVersionProperties innerProperties; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of GalleryInVMAccessControlProfileVersionInner class. + */ + public GalleryInVMAccessControlProfileVersionInner() { + } + + /** + * Get the innerProperties property: Describes the properties of an inVMAccessControlProfile version. + * + * @return the innerProperties value. + */ + private GalleryInVMAccessControlProfileVersionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public GalleryInVMAccessControlProfileVersionInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public GalleryInVMAccessControlProfileVersionInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the mode property: This property allows you to specify whether the access control rules are in Audit mode, in + * Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + * + * @return the mode value. + */ + public AccessControlRulesMode mode() { + return this.innerProperties() == null ? null : this.innerProperties().mode(); + } + + /** + * Set the mode property: This property allows you to specify whether the access control rules are in Audit mode, in + * Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + * + * @param mode the mode value to set. + * @return the GalleryInVMAccessControlProfileVersionInner object itself. + */ + public GalleryInVMAccessControlProfileVersionInner withMode(AccessControlRulesMode mode) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryInVMAccessControlProfileVersionProperties(); + } + this.innerProperties().withMode(mode); + return this; + } + + /** + * Get the defaultAccess property: This property allows you to specify if the requests will be allowed to access the + * host endpoints. Possible values are: 'Allow', 'Deny'. + * + * @return the defaultAccess value. + */ + public EndpointAccess defaultAccess() { + return this.innerProperties() == null ? null : this.innerProperties().defaultAccess(); + } + + /** + * Set the defaultAccess property: This property allows you to specify if the requests will be allowed to access the + * host endpoints. Possible values are: 'Allow', 'Deny'. + * + * @param defaultAccess the defaultAccess value to set. + * @return the GalleryInVMAccessControlProfileVersionInner object itself. + */ + public GalleryInVMAccessControlProfileVersionInner withDefaultAccess(EndpointAccess defaultAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryInVMAccessControlProfileVersionProperties(); + } + this.innerProperties().withDefaultAccess(defaultAccess); + return this; + } + + /** + * Get the rules property: This is the Access Control Rules specification for an inVMAccessControlProfile version. + * + * @return the rules value. + */ + public AccessControlRules rules() { + return this.innerProperties() == null ? null : this.innerProperties().rules(); + } + + /** + * Set the rules property: This is the Access Control Rules specification for an inVMAccessControlProfile version. + * + * @param rules the rules value to set. + * @return the GalleryInVMAccessControlProfileVersionInner object itself. + */ + public GalleryInVMAccessControlProfileVersionInner withRules(AccessControlRules rules) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryInVMAccessControlProfileVersionProperties(); + } + this.innerProperties().withRules(rules); + return this; + } + + /** + * Get the targetLocations property: The target regions where the Resource Profile version is going to be replicated + * to. This property is updatable. + * + * @return the targetLocations value. + */ + public List targetLocations() { + return this.innerProperties() == null ? null : this.innerProperties().targetLocations(); + } + + /** + * Set the targetLocations property: The target regions where the Resource Profile version is going to be replicated + * to. This property is updatable. + * + * @param targetLocations the targetLocations value to set. + * @return the GalleryInVMAccessControlProfileVersionInner object itself. + */ + public GalleryInVMAccessControlProfileVersionInner withTargetLocations(List targetLocations) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryInVMAccessControlProfileVersionProperties(); + } + this.innerProperties().withTargetLocations(targetLocations); + return this; + } + + /** + * Get the excludeFromLatest property: If set to true, Virtual Machines deployed from the latest version of the + * Resource Profile won't use this Profile version. + * + * @return the excludeFromLatest value. + */ + public Boolean excludeFromLatest() { + return this.innerProperties() == null ? null : this.innerProperties().excludeFromLatest(); + } + + /** + * Set the excludeFromLatest property: If set to true, Virtual Machines deployed from the latest version of the + * Resource Profile won't use this Profile version. + * + * @param excludeFromLatest the excludeFromLatest value to set. + * @return the GalleryInVMAccessControlProfileVersionInner object itself. + */ + public GalleryInVMAccessControlProfileVersionInner withExcludeFromLatest(Boolean excludeFromLatest) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryInVMAccessControlProfileVersionProperties(); + } + this.innerProperties().withExcludeFromLatest(excludeFromLatest); + return this; + } + + /** + * Get the publishedDate property: The timestamp for when the Resource Profile Version is published. + * + * @return the publishedDate value. + */ + public OffsetDateTime publishedDate() { + return this.innerProperties() == null ? null : this.innerProperties().publishedDate(); + } + + /** + * Get the provisioningState property: The provisioning state, which only appears in the response. + * + * @return the provisioningState value. + */ + public GalleryProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the replicationStatus property: This is the replication status of the gallery image version. + * + * @return the replicationStatus value. + */ + public ReplicationStatus replicationStatus() { + return this.innerProperties() == null ? null : this.innerProperties().replicationStatus(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GalleryInVMAccessControlProfileVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GalleryInVMAccessControlProfileVersionInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GalleryInVMAccessControlProfileVersionInner. + */ + public static GalleryInVMAccessControlProfileVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GalleryInVMAccessControlProfileVersionInner deserializedGalleryInVMAccessControlProfileVersionInner + = new GalleryInVMAccessControlProfileVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedGalleryInVMAccessControlProfileVersionInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionInner.innerProperties + = GalleryInVMAccessControlProfileVersionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGalleryInVMAccessControlProfileVersionInner; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileVersionProperties.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileVersionProperties.java new file mode 100644 index 0000000000000..5ef11cbd0f587 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileVersionProperties.java @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.compute.models.AccessControlRules; +import com.azure.resourcemanager.compute.models.AccessControlRulesMode; +import com.azure.resourcemanager.compute.models.EndpointAccess; +import com.azure.resourcemanager.compute.models.GalleryProvisioningState; +import com.azure.resourcemanager.compute.models.GalleryResourceProfileVersionPropertiesBase; +import com.azure.resourcemanager.compute.models.ReplicationStatus; +import com.azure.resourcemanager.compute.models.TargetRegion; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Describes the properties of an inVMAccessControlProfile version. + */ +@Fluent +public final class GalleryInVMAccessControlProfileVersionProperties + extends GalleryResourceProfileVersionPropertiesBase { + /* + * This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or + * Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + */ + private AccessControlRulesMode mode; + + /* + * This property allows you to specify if the requests will be allowed to access the host endpoints. Possible values + * are: 'Allow', 'Deny'. + */ + private EndpointAccess defaultAccess; + + /* + * This is the Access Control Rules specification for an inVMAccessControlProfile version. + */ + private AccessControlRules rules; + + /* + * This is the replication status of the gallery image version. + */ + private ReplicationStatus replicationStatus; + + /* + * The provisioning state, which only appears in the response. + */ + private GalleryProvisioningState provisioningState; + + /* + * The timestamp for when the Resource Profile Version is published. + */ + private OffsetDateTime publishedDate; + + /** + * Creates an instance of GalleryInVMAccessControlProfileVersionProperties class. + */ + public GalleryInVMAccessControlProfileVersionProperties() { + } + + /** + * Get the mode property: This property allows you to specify whether the access control rules are in Audit mode, in + * Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + * + * @return the mode value. + */ + public AccessControlRulesMode mode() { + return this.mode; + } + + /** + * Set the mode property: This property allows you to specify whether the access control rules are in Audit mode, in + * Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + * + * @param mode the mode value to set. + * @return the GalleryInVMAccessControlProfileVersionProperties object itself. + */ + public GalleryInVMAccessControlProfileVersionProperties withMode(AccessControlRulesMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the defaultAccess property: This property allows you to specify if the requests will be allowed to access the + * host endpoints. Possible values are: 'Allow', 'Deny'. + * + * @return the defaultAccess value. + */ + public EndpointAccess defaultAccess() { + return this.defaultAccess; + } + + /** + * Set the defaultAccess property: This property allows you to specify if the requests will be allowed to access the + * host endpoints. Possible values are: 'Allow', 'Deny'. + * + * @param defaultAccess the defaultAccess value to set. + * @return the GalleryInVMAccessControlProfileVersionProperties object itself. + */ + public GalleryInVMAccessControlProfileVersionProperties withDefaultAccess(EndpointAccess defaultAccess) { + this.defaultAccess = defaultAccess; + return this; + } + + /** + * Get the rules property: This is the Access Control Rules specification for an inVMAccessControlProfile version. + * + * @return the rules value. + */ + public AccessControlRules rules() { + return this.rules; + } + + /** + * Set the rules property: This is the Access Control Rules specification for an inVMAccessControlProfile version. + * + * @param rules the rules value to set. + * @return the GalleryInVMAccessControlProfileVersionProperties object itself. + */ + public GalleryInVMAccessControlProfileVersionProperties withRules(AccessControlRules rules) { + this.rules = rules; + return this; + } + + /** + * Get the replicationStatus property: This is the replication status of the gallery image version. + * + * @return the replicationStatus value. + */ + @Override + public ReplicationStatus replicationStatus() { + return this.replicationStatus; + } + + /** + * Get the provisioningState property: The provisioning state, which only appears in the response. + * + * @return the provisioningState value. + */ + @Override + public GalleryProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the publishedDate property: The timestamp for when the Resource Profile Version is published. + * + * @return the publishedDate value. + */ + @Override + public OffsetDateTime publishedDate() { + return this.publishedDate; + } + + /** + * {@inheritDoc} + */ + @Override + public GalleryInVMAccessControlProfileVersionProperties withTargetLocations(List targetLocations) { + super.withTargetLocations(targetLocations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public GalleryInVMAccessControlProfileVersionProperties withExcludeFromLatest(Boolean excludeFromLatest) { + super.withExcludeFromLatest(excludeFromLatest); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (mode() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property mode in model GalleryInVMAccessControlProfileVersionProperties")); + } + if (defaultAccess() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property defaultAccess in model GalleryInVMAccessControlProfileVersionProperties")); + } + if (rules() != null) { + rules().validate(); + } + if (targetLocations() != null) { + targetLocations().forEach(e -> e.validate()); + } + if (replicationStatus() != null) { + replicationStatus().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GalleryInVMAccessControlProfileVersionProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("targetLocations", targetLocations(), + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("excludeFromLatest", excludeFromLatest()); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("defaultAccess", this.defaultAccess == null ? null : this.defaultAccess.toString()); + jsonWriter.writeJsonField("rules", this.rules); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GalleryInVMAccessControlProfileVersionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GalleryInVMAccessControlProfileVersionProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GalleryInVMAccessControlProfileVersionProperties. + */ + public static GalleryInVMAccessControlProfileVersionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GalleryInVMAccessControlProfileVersionProperties deserializedGalleryInVMAccessControlProfileVersionProperties + = new GalleryInVMAccessControlProfileVersionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetLocations".equals(fieldName)) { + List targetLocations = reader.readArray(reader1 -> TargetRegion.fromJson(reader1)); + deserializedGalleryInVMAccessControlProfileVersionProperties.withTargetLocations(targetLocations); + } else if ("excludeFromLatest".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionProperties + .withExcludeFromLatest(reader.getNullable(JsonReader::getBoolean)); + } else if ("publishedDate".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionProperties.publishedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionProperties.provisioningState + = GalleryProvisioningState.fromString(reader.getString()); + } else if ("replicationStatus".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionProperties.replicationStatus + = ReplicationStatus.fromJson(reader); + } else if ("mode".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionProperties.mode + = AccessControlRulesMode.fromString(reader.getString()); + } else if ("defaultAccess".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionProperties.defaultAccess + = EndpointAccess.fromString(reader.getString()); + } else if ("rules".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionProperties.rules + = AccessControlRules.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGalleryInVMAccessControlProfileVersionProperties; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInner.java index de91dbf9df5a4..9a0deeef7e8b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInner.java @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.compute.models.GalleryIdentifier; +import com.azure.resourcemanager.compute.models.GalleryIdentity; import com.azure.resourcemanager.compute.models.GalleryProvisioningState; import com.azure.resourcemanager.compute.models.SharingProfile; import com.azure.resourcemanager.compute.models.SharingStatus; @@ -28,9 +29,14 @@ public final class GalleryInner extends Resource { private GalleryProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The identity of the gallery, if configured. */ - private String id; + private GalleryIdentity identity; + + /* + * The type of the resource. + */ + private String type; /* * The name of the resource. @@ -38,9 +44,9 @@ public final class GalleryInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of GalleryInner class. @@ -58,13 +64,33 @@ private GalleryProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the identity property: The identity of the gallery, if configured. * - * @return the id value. + * @return the identity value. + */ + public GalleryIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the gallery, if configured. + * + * @param identity the identity value to set. + * @return the GalleryInner object itself. + */ + public GalleryInner withIdentity(GalleryIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -78,13 +104,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -224,6 +250,9 @@ public void validate() { if (innerProperties() != null) { innerProperties().validate(); } + if (identity() != null) { + identity().validate(); + } } /** @@ -235,6 +264,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -267,6 +297,8 @@ public static GalleryInner fromJson(JsonReader jsonReader) throws IOException { deserializedGalleryInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedGalleryInner.innerProperties = GalleryProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedGalleryInner.identity = GalleryIdentity.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GallerySoftDeletedResourceInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GallerySoftDeletedResourceInner.java new file mode 100644 index 0000000000000..e05e8bfbc0379 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GallerySoftDeletedResourceInner.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.compute.models.SoftDeletedArtifactTypes; +import java.io.IOException; +import java.util.Map; + +/** + * The details information of soft-deleted resource. + */ +@Fluent +public final class GallerySoftDeletedResourceInner extends Resource { + /* + * Describes the properties of a soft-deleted resource. + */ + private GallerySoftDeletedResourceProperties innerProperties; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of GallerySoftDeletedResourceInner class. + */ + public GallerySoftDeletedResourceInner() { + } + + /** + * Get the innerProperties property: Describes the properties of a soft-deleted resource. + * + * @return the innerProperties value. + */ + private GallerySoftDeletedResourceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public GallerySoftDeletedResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public GallerySoftDeletedResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the resourceArmId property: arm id of the soft-deleted resource. + * + * @return the resourceArmId value. + */ + public String resourceArmId() { + return this.innerProperties() == null ? null : this.innerProperties().resourceArmId(); + } + + /** + * Set the resourceArmId property: arm id of the soft-deleted resource. + * + * @param resourceArmId the resourceArmId value to set. + * @return the GallerySoftDeletedResourceInner object itself. + */ + public GallerySoftDeletedResourceInner withResourceArmId(String resourceArmId) { + if (this.innerProperties() == null) { + this.innerProperties = new GallerySoftDeletedResourceProperties(); + } + this.innerProperties().withResourceArmId(resourceArmId); + return this; + } + + /** + * Get the softDeletedArtifactType property: artifact type of the soft-deleted resource. + * + * @return the softDeletedArtifactType value. + */ + public SoftDeletedArtifactTypes softDeletedArtifactType() { + return this.innerProperties() == null ? null : this.innerProperties().softDeletedArtifactType(); + } + + /** + * Set the softDeletedArtifactType property: artifact type of the soft-deleted resource. + * + * @param softDeletedArtifactType the softDeletedArtifactType value to set. + * @return the GallerySoftDeletedResourceInner object itself. + */ + public GallerySoftDeletedResourceInner + withSoftDeletedArtifactType(SoftDeletedArtifactTypes softDeletedArtifactType) { + if (this.innerProperties() == null) { + this.innerProperties = new GallerySoftDeletedResourceProperties(); + } + this.innerProperties().withSoftDeletedArtifactType(softDeletedArtifactType); + return this; + } + + /** + * Get the softDeletedTime property: The timestamp for when the resource is soft-deleted. In dateTime offset format. + * + * @return the softDeletedTime value. + */ + public String softDeletedTime() { + return this.innerProperties() == null ? null : this.innerProperties().softDeletedTime(); + } + + /** + * Set the softDeletedTime property: The timestamp for when the resource is soft-deleted. In dateTime offset format. + * + * @param softDeletedTime the softDeletedTime value to set. + * @return the GallerySoftDeletedResourceInner object itself. + */ + public GallerySoftDeletedResourceInner withSoftDeletedTime(String softDeletedTime) { + if (this.innerProperties() == null) { + this.innerProperties = new GallerySoftDeletedResourceProperties(); + } + this.innerProperties().withSoftDeletedTime(softDeletedTime); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GallerySoftDeletedResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GallerySoftDeletedResourceInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GallerySoftDeletedResourceInner. + */ + public static GallerySoftDeletedResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GallerySoftDeletedResourceInner deserializedGallerySoftDeletedResourceInner + = new GallerySoftDeletedResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGallerySoftDeletedResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGallerySoftDeletedResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGallerySoftDeletedResourceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedGallerySoftDeletedResourceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedGallerySoftDeletedResourceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedGallerySoftDeletedResourceInner.innerProperties + = GallerySoftDeletedResourceProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGallerySoftDeletedResourceInner; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GallerySoftDeletedResourceProperties.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GallerySoftDeletedResourceProperties.java new file mode 100644 index 0000000000000..c55bccb6eb60e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/GallerySoftDeletedResourceProperties.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.compute.models.SoftDeletedArtifactTypes; +import java.io.IOException; + +/** + * Describes the properties of a soft-deleted resource. + */ +@Fluent +public final class GallerySoftDeletedResourceProperties + implements JsonSerializable { + /* + * arm id of the soft-deleted resource + */ + private String resourceArmId; + + /* + * artifact type of the soft-deleted resource + */ + private SoftDeletedArtifactTypes softDeletedArtifactType; + + /* + * The timestamp for when the resource is soft-deleted. In dateTime offset format. + */ + private String softDeletedTime; + + /** + * Creates an instance of GallerySoftDeletedResourceProperties class. + */ + public GallerySoftDeletedResourceProperties() { + } + + /** + * Get the resourceArmId property: arm id of the soft-deleted resource. + * + * @return the resourceArmId value. + */ + public String resourceArmId() { + return this.resourceArmId; + } + + /** + * Set the resourceArmId property: arm id of the soft-deleted resource. + * + * @param resourceArmId the resourceArmId value to set. + * @return the GallerySoftDeletedResourceProperties object itself. + */ + public GallerySoftDeletedResourceProperties withResourceArmId(String resourceArmId) { + this.resourceArmId = resourceArmId; + return this; + } + + /** + * Get the softDeletedArtifactType property: artifact type of the soft-deleted resource. + * + * @return the softDeletedArtifactType value. + */ + public SoftDeletedArtifactTypes softDeletedArtifactType() { + return this.softDeletedArtifactType; + } + + /** + * Set the softDeletedArtifactType property: artifact type of the soft-deleted resource. + * + * @param softDeletedArtifactType the softDeletedArtifactType value to set. + * @return the GallerySoftDeletedResourceProperties object itself. + */ + public GallerySoftDeletedResourceProperties + withSoftDeletedArtifactType(SoftDeletedArtifactTypes softDeletedArtifactType) { + this.softDeletedArtifactType = softDeletedArtifactType; + return this; + } + + /** + * Get the softDeletedTime property: The timestamp for when the resource is soft-deleted. In dateTime offset format. + * + * @return the softDeletedTime value. + */ + public String softDeletedTime() { + return this.softDeletedTime; + } + + /** + * Set the softDeletedTime property: The timestamp for when the resource is soft-deleted. In dateTime offset format. + * + * @param softDeletedTime the softDeletedTime value to set. + * @return the GallerySoftDeletedResourceProperties object itself. + */ + public GallerySoftDeletedResourceProperties withSoftDeletedTime(String softDeletedTime) { + this.softDeletedTime = softDeletedTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceArmId", this.resourceArmId); + jsonWriter.writeStringField("softDeletedArtifactType", + this.softDeletedArtifactType == null ? null : this.softDeletedArtifactType.toString()); + jsonWriter.writeStringField("softDeletedTime", this.softDeletedTime); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GallerySoftDeletedResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GallerySoftDeletedResourceProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GallerySoftDeletedResourceProperties. + */ + public static GallerySoftDeletedResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GallerySoftDeletedResourceProperties deserializedGallerySoftDeletedResourceProperties + = new GallerySoftDeletedResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceArmId".equals(fieldName)) { + deserializedGallerySoftDeletedResourceProperties.resourceArmId = reader.getString(); + } else if ("softDeletedArtifactType".equals(fieldName)) { + deserializedGallerySoftDeletedResourceProperties.softDeletedArtifactType + = SoftDeletedArtifactTypes.fromString(reader.getString()); + } else if ("softDeletedTime".equals(fieldName)) { + deserializedGallerySoftDeletedResourceProperties.softDeletedTime = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGallerySoftDeletedResourceProperties; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/ImageInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/ImageInner.java index 0e1aa53d606a4..37ccc5b063010 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/ImageInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/ImageInner.java @@ -33,9 +33,9 @@ public final class ImageInner extends Resource { private ExtendedLocation extendedLocation; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -43,9 +43,9 @@ public final class ImageInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ImageInner class. @@ -83,13 +83,13 @@ public ImageInner withExtendedLocation(ExtendedLocation extendedLocation) { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -103,13 +103,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/PrivateEndpointConnectionInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/PrivateEndpointConnectionInner.java index d4da41d59d1b5..95cee3732ce4b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/PrivateEndpointConnectionInner.java @@ -25,9 +25,9 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { private PrivateEndpointConnectionProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -35,9 +35,9 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of PrivateEndpointConnectionInner class. @@ -55,13 +55,13 @@ private PrivateEndpointConnectionProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -75,13 +75,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/ProximityPlacementGroupInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/ProximityPlacementGroupInner.java index cfdd0ecef3fe5..287954c379849 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/ProximityPlacementGroupInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/ProximityPlacementGroupInner.java @@ -34,9 +34,9 @@ public final class ProximityPlacementGroupInner extends Resource { private List zones; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -44,9 +44,9 @@ public final class ProximityPlacementGroupInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ProximityPlacementGroupInner class. @@ -86,13 +86,13 @@ public ProximityPlacementGroupInner withZones(List zones) { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -106,13 +106,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointCollectionInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointCollectionInner.java index fbf81c0391de1..cbceac5d75656 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointCollectionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointCollectionInner.java @@ -25,9 +25,9 @@ public final class RestorePointCollectionInner extends Resource { private RestorePointCollectionProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -35,9 +35,9 @@ public final class RestorePointCollectionInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of RestorePointCollectionInner class. @@ -55,13 +55,13 @@ private RestorePointCollectionProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -75,13 +75,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointInner.java index e7e49e88e8d51..aab0e298d07f6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointInner.java @@ -28,9 +28,9 @@ public final class RestorePointInner extends ProxyResource { private RestorePointProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -38,9 +38,9 @@ public final class RestorePointInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of RestorePointInner class. @@ -58,13 +58,13 @@ private RestorePointProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -78,13 +78,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RollingUpgradeStatusInfoInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RollingUpgradeStatusInfoInner.java index 66d9f3af24cc2..593964bf852f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RollingUpgradeStatusInfoInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RollingUpgradeStatusInfoInner.java @@ -27,9 +27,9 @@ public final class RollingUpgradeStatusInfoInner extends Resource { private RollingUpgradeStatusInfoProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -37,9 +37,9 @@ public final class RollingUpgradeStatusInfoInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of RollingUpgradeStatusInfoInner class. @@ -57,13 +57,13 @@ private RollingUpgradeStatusInfoProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -77,13 +77,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RunCommandDocumentInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RunCommandDocumentInner.java index 646326300c0b8..8dc879cabfc36 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RunCommandDocumentInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/RunCommandDocumentInner.java @@ -127,7 +127,6 @@ public RunCommandDocumentInner withDescription(String description) { */ @Override public void validate() { - super.validate(); if (script() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property script in model RunCommandDocumentInner")); @@ -135,6 +134,27 @@ public void validate() { if (parameters() != null) { parameters().forEach(e -> e.validate()); } + if (schema() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property schema in model RunCommandDocumentInner")); + } + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model RunCommandDocumentInner")); + } + if (osType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property osType in model RunCommandDocumentInner")); + } + if (label() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property label in model RunCommandDocumentInner")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model RunCommandDocumentInner")); + } } private static final ClientLogger LOGGER = new ClientLogger(RunCommandDocumentInner.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageInner.java index 844783690a72f..ed08b33b78a4f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageInner.java @@ -34,9 +34,9 @@ public final class SharedGalleryImageInner extends PirSharedGalleryResource { private SharedGalleryImageProperties innerProperties; /* - * Resource name + * The identifier information of shared gallery. */ - private String name; + private SharedGalleryIdentifier innerIdentifier; /* * Resource location @@ -44,9 +44,9 @@ public final class SharedGalleryImageInner extends PirSharedGalleryResource { private String location; /* - * The identifier information of shared gallery. + * Resource name */ - private SharedGalleryIdentifier innerIdentifier; + private String name; /** * Creates an instance of SharedGalleryImageInner class. @@ -64,13 +64,12 @@ private SharedGalleryImageProperties innerProperties() { } /** - * Get the name property: Resource name. + * Get the innerIdentifier property: The identifier information of shared gallery. * - * @return the name value. + * @return the innerIdentifier value. */ - @Override - public String name() { - return this.name; + private SharedGalleryIdentifier innerIdentifier() { + return this.innerIdentifier; } /** @@ -84,12 +83,13 @@ public String location() { } /** - * Get the innerIdentifier property: The identifier information of shared gallery. + * Get the name property: Resource name. * - * @return the innerIdentifier value. + * @return the name value. */ - private SharedGalleryIdentifier innerIdentifier() { - return this.innerIdentifier; + @Override + public String name() { + return this.name; } /** @@ -333,7 +333,7 @@ public SharedGalleryImageInner withPurchasePlan(ImagePurchasePlan purchasePlan) } /** - * Get the architecture property: The architecture of the image. Applicable to OS disks only. + * Get the architecture property: CPU architecture supported by an OS disk. * * @return the architecture value. */ @@ -342,7 +342,7 @@ public Architecture architecture() { } /** - * Set the architecture property: The architecture of the image. Applicable to OS disks only. + * Set the architecture property: CPU architecture supported by an OS disk. * * @param architecture the architecture value to set. * @return the SharedGalleryImageInner object itself. @@ -431,10 +431,12 @@ public SharedGalleryImageInner withArtifactTags(Map artifactTags */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } + if (innerIdentifier() != null) { + innerIdentifier().validate(); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageProperties.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageProperties.java index d8b272904f3a8..a9a8f6b076756 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageProperties.java @@ -81,7 +81,7 @@ public final class SharedGalleryImageProperties implements JsonSerializable artif */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } + if (innerIdentifier() != null) { + innerIdentifier().validate(); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryInner.java index d29ced049a6c5..8a021759d367b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryInner.java @@ -23,9 +23,9 @@ public final class SharedGalleryInner extends PirSharedGalleryResource { private SharedGalleryProperties innerProperties; /* - * Resource name + * The identifier information of shared gallery. */ - private String name; + private SharedGalleryIdentifier innerIdentifier; /* * Resource location @@ -33,9 +33,9 @@ public final class SharedGalleryInner extends PirSharedGalleryResource { private String location; /* - * The identifier information of shared gallery. + * Resource name */ - private SharedGalleryIdentifier innerIdentifier; + private String name; /** * Creates an instance of SharedGalleryInner class. @@ -53,13 +53,12 @@ private SharedGalleryProperties innerProperties() { } /** - * Get the name property: Resource name. + * Get the innerIdentifier property: The identifier information of shared gallery. * - * @return the name value. + * @return the innerIdentifier value. */ - @Override - public String name() { - return this.name; + private SharedGalleryIdentifier innerIdentifier() { + return this.innerIdentifier; } /** @@ -73,12 +72,13 @@ public String location() { } /** - * Get the innerIdentifier property: The identifier information of shared gallery. + * Get the name property: Resource name. * - * @return the innerIdentifier value. + * @return the name value. */ - private SharedGalleryIdentifier innerIdentifier() { - return this.innerIdentifier; + @Override + public String name() { + return this.name; } /** @@ -120,10 +120,12 @@ public Map artifactTags() { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } + if (innerIdentifier() != null) { + innerIdentifier().validate(); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SnapshotInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SnapshotInner.java index 722861f1b978f..d49a12dd49ffd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SnapshotInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SnapshotInner.java @@ -55,9 +55,9 @@ public final class SnapshotInner extends Resource { private SnapshotProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -65,9 +65,9 @@ public final class SnapshotInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of SnapshotInner class. @@ -140,13 +140,13 @@ private SnapshotProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -160,13 +160,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SshPublicKeyResourceInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SshPublicKeyResourceInner.java index aa1ebbc184b68..46559d7e4cb4d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SshPublicKeyResourceInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SshPublicKeyResourceInner.java @@ -23,9 +23,9 @@ public final class SshPublicKeyResourceInner extends Resource { private SshPublicKeyResourceProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -33,9 +33,9 @@ public final class SshPublicKeyResourceInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of SshPublicKeyResourceInner class. @@ -53,13 +53,13 @@ private SshPublicKeyResourceProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -73,13 +73,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/UsageInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/UsageInner.java index edff08e111f8d..d230bb8b3ad9b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/UsageInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/UsageInner.java @@ -21,7 +21,7 @@ public final class UsageInner implements JsonSerializable { /* * An enum describing the unit of usage measurement. */ - private String unit = "Count"; + private final String unit = "Count"; /* * The current usage of the resource. @@ -53,17 +53,6 @@ public String unit() { return this.unit; } - /** - * Set the unit property: An enum describing the unit of usage measurement. - * - * @param unit the unit value to set. - * @return the UsageInner object itself. - */ - public UsageInner withUnit(String unit) { - this.unit = unit; - return this; - } - /** * Get the currentValue property: The current usage of the resource. * diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionImageInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionImageInner.java index d50ee0c13f63f..5df4e03736dce 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionImageInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionImageInner.java @@ -23,9 +23,9 @@ public final class VirtualMachineExtensionImageInner extends Resource { private VirtualMachineExtensionImageProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -33,9 +33,9 @@ public final class VirtualMachineExtensionImageInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of VirtualMachineExtensionImageInner class. @@ -53,13 +53,13 @@ private VirtualMachineExtensionImageProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -73,13 +73,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionInner.java index 6a53c61ee7fca..2484c84be5278 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionInner.java @@ -26,9 +26,9 @@ public final class VirtualMachineExtensionInner extends ResourceWithOptionalLoca private VirtualMachineExtensionProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -36,9 +36,9 @@ public final class VirtualMachineExtensionInner extends ResourceWithOptionalLoca private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of VirtualMachineExtensionInner class. @@ -56,13 +56,13 @@ private VirtualMachineExtensionProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -76,13 +76,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -414,7 +414,6 @@ public VirtualMachineExtensionInner withProvisionAfterExtensions(List pr */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineImageInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineImageInner.java index d52d0d8777b5c..1148849061b07 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineImageInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineImageInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.compute.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -307,12 +308,25 @@ public VirtualMachineImageInner withImageDeprecationStatus(ImageDeprecationStatu */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model VirtualMachineImageInner")); + } + if (location() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property location in model VirtualMachineImageInner")); + } + if (extendedLocation() != null) { + extendedLocation().validate(); + } } + private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineImageInner.class); + /** * {@inheritDoc} */ diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInner.java index a1d3f423b7d62..ab4a78e70689f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInner.java @@ -83,9 +83,9 @@ public final class VirtualMachineInner extends Resource { private String etag; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -93,9 +93,9 @@ public final class VirtualMachineInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of VirtualMachineInner class. @@ -230,13 +230,13 @@ public String etag() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -250,13 +250,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineRunCommandInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineRunCommandInner.java index c78f25b0f66c4..92bb178cd3d08 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineRunCommandInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineRunCommandInner.java @@ -28,9 +28,9 @@ public final class VirtualMachineRunCommandInner extends Resource { private VirtualMachineRunCommandProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -38,9 +38,9 @@ public final class VirtualMachineRunCommandInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of VirtualMachineRunCommandInner class. @@ -58,13 +58,13 @@ private VirtualMachineRunCommandProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -78,13 +78,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetExtensionInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetExtensionInner.java index 3dea078f60e76..c1d2ef8891689 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetExtensionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetExtensionInner.java @@ -380,7 +380,6 @@ public KeyVaultSecretReference protectedSettingsFromKeyVault() { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetInner.java index e756898fbb35d..6ea65bf212f3f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetInner.java @@ -76,9 +76,9 @@ public final class VirtualMachineScaleSetInner extends Resource { private String etag; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -86,9 +86,9 @@ public final class VirtualMachineScaleSetInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of VirtualMachineScaleSetInner class. @@ -224,13 +224,13 @@ public String etag() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -244,13 +244,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMExtensionInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMExtensionInner.java index bef9a3369630e..5892e1dce8419 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMExtensionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMExtensionInner.java @@ -418,7 +418,6 @@ public VirtualMachineScaleSetVMExtensionInner withProvisionAfterExtensions(List< */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMInner.java index a697c31a868c4..a7cec3b6f19ae 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMInner.java @@ -77,9 +77,9 @@ public final class VirtualMachineScaleSetVMInner extends Resource { private String etag; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -87,9 +87,9 @@ public final class VirtualMachineScaleSetVMInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of VirtualMachineScaleSetVMInner class. @@ -201,13 +201,13 @@ public String etag() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -221,13 +221,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineUpdateInner.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineUpdateInner.java index d025b9762bf2a..ddb211cfcf916 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineUpdateInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineUpdateInner.java @@ -807,7 +807,6 @@ public OffsetDateTime timeCreated() { */ @Override public void validate() { - super.validate(); if (plan() != null) { plan().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/AvailabilitySetsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/AvailabilitySetsClientImpl.java index ce19a887de870..24c05540169e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/AvailabilitySetsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/AvailabilitySetsClientImpl.java @@ -688,7 +688,7 @@ public AvailabilitySetInner getByResourceGroup(String resourceGroupName, String /** * Lists all availability sets in a subscription. * - * @param expand The expand expression to apply to the operation. Allowed values are 'instanceView'. + * @param expand The expand expression to apply to the operation. Allowed values are 'virtualMachines/$ref'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -718,7 +718,7 @@ private Mono> listSinglePageAsync(String exp /** * Lists all availability sets in a subscription. * - * @param expand The expand expression to apply to the operation. Allowed values are 'instanceView'. + * @param expand The expand expression to apply to the operation. Allowed values are 'virtualMachines/$ref'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. @@ -748,7 +748,7 @@ private Mono> listSinglePageAsync(String exp /** * Lists all availability sets in a subscription. * - * @param expand The expand expression to apply to the operation. Allowed values are 'instanceView'. + * @param expand The expand expression to apply to the operation. Allowed values are 'virtualMachines/$ref'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -777,7 +777,7 @@ public PagedFlux listAsync() { /** * Lists all availability sets in a subscription. * - * @param expand The expand expression to apply to the operation. Allowed values are 'instanceView'. + * @param expand The expand expression to apply to the operation. Allowed values are 'virtualMachines/$ref'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. @@ -806,7 +806,7 @@ public PagedIterable list() { /** * Lists all availability sets in a subscription. * - * @param expand The expand expression to apply to the operation. Allowed values are 'instanceView'. + * @param expand The expand expression to apply to the operation. Allowed values are 'virtualMachines/$ref'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleriesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleriesClientImpl.java index 86adb5d230101..995e8ec28430c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleriesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleriesClientImpl.java @@ -95,7 +95,7 @@ public Mono> getWithResponseAsync(String locatio return Mono .error(new IllegalArgumentException("Parameter publicGalleryName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -133,7 +133,7 @@ private Mono> getWithResponseAsync(String locati return Mono .error(new IllegalArgumentException("Parameter publicGalleryName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, publicGalleryName, diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleryImageVersionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleryImageVersionsClientImpl.java index 5411e4f628e36..c17fbec78997d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleryImageVersionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleryImageVersionsClientImpl.java @@ -132,7 +132,7 @@ public Mono> getWithResponseAsync(St return Mono.error( new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -181,7 +181,7 @@ private Mono> getWithResponseAsync(S return Mono.error( new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, apiVersion, @@ -286,7 +286,7 @@ private Mono> listSinglePageAsy return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -331,7 +331,7 @@ private Mono> listSinglePageAsy return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleryImagesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleryImagesClientImpl.java index a0e2b3d67f0a8..dc6229f391dd5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleryImagesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleryImagesClientImpl.java @@ -123,7 +123,7 @@ public Mono> getWithResponseAsync(String lo return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -165,7 +165,7 @@ private Mono> getWithResponseAsync(String l return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, apiVersion, @@ -253,7 +253,7 @@ private Mono> listSinglePageAsync(Stri return Mono .error(new IllegalArgumentException("Parameter publicGalleryName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -293,7 +293,7 @@ private Mono> listSinglePageAsync(Stri return Mono .error(new IllegalArgumentException("Parameter publicGalleryName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/ComputeManagementClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/ComputeManagementClientImpl.java index ed093a7fb4791..6fda45df5549f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/ComputeManagementClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/ComputeManagementClientImpl.java @@ -17,8 +17,8 @@ import com.azure.resourcemanager.compute.fluent.CloudServicesClient; import com.azure.resourcemanager.compute.fluent.CloudServicesUpdateDomainsClient; import com.azure.resourcemanager.compute.fluent.CommunityGalleriesClient; -import com.azure.resourcemanager.compute.fluent.CommunityGalleryImagesClient; import com.azure.resourcemanager.compute.fluent.CommunityGalleryImageVersionsClient; +import com.azure.resourcemanager.compute.fluent.CommunityGalleryImagesClient; import com.azure.resourcemanager.compute.fluent.ComputeManagementClient; import com.azure.resourcemanager.compute.fluent.DedicatedHostGroupsClient; import com.azure.resourcemanager.compute.fluent.DedicatedHostsClient; @@ -27,10 +27,12 @@ import com.azure.resourcemanager.compute.fluent.DiskRestorePointsClient; import com.azure.resourcemanager.compute.fluent.DisksClient; import com.azure.resourcemanager.compute.fluent.GalleriesClient; -import com.azure.resourcemanager.compute.fluent.GalleryApplicationsClient; import com.azure.resourcemanager.compute.fluent.GalleryApplicationVersionsClient; -import com.azure.resourcemanager.compute.fluent.GalleryImagesClient; +import com.azure.resourcemanager.compute.fluent.GalleryApplicationsClient; import com.azure.resourcemanager.compute.fluent.GalleryImageVersionsClient; +import com.azure.resourcemanager.compute.fluent.GalleryImagesClient; +import com.azure.resourcemanager.compute.fluent.GalleryInVMAccessControlProfileVersionsClient; +import com.azure.resourcemanager.compute.fluent.GalleryInVMAccessControlProfilesClient; import com.azure.resourcemanager.compute.fluent.GallerySharingProfilesClient; import com.azure.resourcemanager.compute.fluent.ImagesClient; import com.azure.resourcemanager.compute.fluent.LogAnalyticsClient; @@ -40,9 +42,10 @@ import com.azure.resourcemanager.compute.fluent.RestorePointCollectionsClient; import com.azure.resourcemanager.compute.fluent.RestorePointsClient; import com.azure.resourcemanager.compute.fluent.SharedGalleriesClient; -import com.azure.resourcemanager.compute.fluent.SharedGalleryImagesClient; import com.azure.resourcemanager.compute.fluent.SharedGalleryImageVersionsClient; +import com.azure.resourcemanager.compute.fluent.SharedGalleryImagesClient; import com.azure.resourcemanager.compute.fluent.SnapshotsClient; +import com.azure.resourcemanager.compute.fluent.SoftDeletedResourcesClient; import com.azure.resourcemanager.compute.fluent.SshPublicKeysClient; import com.azure.resourcemanager.compute.fluent.UsagesClient; import com.azure.resourcemanager.compute.fluent.VirtualMachineExtensionImagesClient; @@ -52,12 +55,12 @@ import com.azure.resourcemanager.compute.fluent.VirtualMachineRunCommandsClient; import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetExtensionsClient; import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetRollingUpgradesClient; -import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetsClient; import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetVMExtensionsClient; import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetVMRunCommandsClient; import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetVMsClient; -import com.azure.resourcemanager.compute.fluent.VirtualMachinesClient; +import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetsClient; import com.azure.resourcemanager.compute.fluent.VirtualMachineSizesClient; +import com.azure.resourcemanager.compute.fluent.VirtualMachinesClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; @@ -656,6 +659,20 @@ public GalleryApplicationVersionsClient getGalleryApplicationVersions() { return this.galleryApplicationVersions; } + /** + * The SoftDeletedResourcesClient object to access its operations. + */ + private final SoftDeletedResourcesClient softDeletedResources; + + /** + * Gets the SoftDeletedResourcesClient object to access its operations. + * + * @return the SoftDeletedResourcesClient object. + */ + public SoftDeletedResourcesClient getSoftDeletedResources() { + return this.softDeletedResources; + } + /** * The GallerySharingProfilesClient object to access its operations. */ @@ -670,6 +687,34 @@ public GallerySharingProfilesClient getGallerySharingProfiles() { return this.gallerySharingProfiles; } + /** + * The GalleryInVMAccessControlProfilesClient object to access its operations. + */ + private final GalleryInVMAccessControlProfilesClient galleryInVMAccessControlProfiles; + + /** + * Gets the GalleryInVMAccessControlProfilesClient object to access its operations. + * + * @return the GalleryInVMAccessControlProfilesClient object. + */ + public GalleryInVMAccessControlProfilesClient getGalleryInVMAccessControlProfiles() { + return this.galleryInVMAccessControlProfiles; + } + + /** + * The GalleryInVMAccessControlProfileVersionsClient object to access its operations. + */ + private final GalleryInVMAccessControlProfileVersionsClient galleryInVMAccessControlProfileVersions; + + /** + * Gets the GalleryInVMAccessControlProfileVersionsClient object to access its operations. + * + * @return the GalleryInVMAccessControlProfileVersionsClient object. + */ + public GalleryInVMAccessControlProfileVersionsClient getGalleryInVMAccessControlProfileVersions() { + return this.galleryInVMAccessControlProfileVersions; + } + /** * The SharedGalleriesClient object to access its operations. */ @@ -880,7 +925,10 @@ public CloudServiceOperatingSystemsClient getCloudServiceOperatingSystems() { this.galleryImageVersions = new GalleryImageVersionsClientImpl(this); this.galleryApplications = new GalleryApplicationsClientImpl(this); this.galleryApplicationVersions = new GalleryApplicationVersionsClientImpl(this); + this.softDeletedResources = new SoftDeletedResourcesClientImpl(this); this.gallerySharingProfiles = new GallerySharingProfilesClientImpl(this); + this.galleryInVMAccessControlProfiles = new GalleryInVMAccessControlProfilesClientImpl(this); + this.galleryInVMAccessControlProfileVersions = new GalleryInVMAccessControlProfileVersionsClientImpl(this); this.sharedGalleries = new SharedGalleriesClientImpl(this); this.sharedGalleryImages = new SharedGalleryImagesClientImpl(this); this.sharedGalleryImageVersions = new SharedGalleryImageVersionsClientImpl(this); diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleriesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleriesClientImpl.java index 7755dc8b379ea..bb012667f51b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleriesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleriesClientImpl.java @@ -186,7 +186,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { gallery.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -231,7 +231,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { gallery.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -435,7 +435,7 @@ public Mono>> updateWithResponseAsync(String resourceG } else { gallery.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -480,7 +480,7 @@ private Mono>> updateWithResponseAsync(String resource } else { gallery.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -677,7 +677,7 @@ public Mono> getByResourceGroupWithResponseAsync(String r if (galleryName == null) { return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext( @@ -718,7 +718,7 @@ private Mono> getByResourceGroupWithResponseAsync(String if (galleryName == null) { return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -808,7 +808,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (galleryName == null) { return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -845,7 +845,7 @@ private Mono>> deleteWithResponseAsync(String resource if (galleryName == null) { return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1006,7 +1006,7 @@ private Mono> listByResourceGroupSinglePageAsync(Str return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), @@ -1042,7 +1042,7 @@ private Mono> listByResourceGroupSinglePageAsync(Str return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1130,7 +1130,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -1160,7 +1160,7 @@ private Mono> listSinglePageAsync(Context context) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryApplicationVersionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryApplicationVersionsClientImpl.java index a9928ff42de20..f4186eb9a4c2f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryApplicationVersionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryApplicationVersionsClientImpl.java @@ -192,7 +192,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { galleryApplicationVersion.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -253,7 +253,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { galleryApplicationVersion.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -536,7 +536,7 @@ public Mono>> updateWithResponseAsync(String resourceG } else { galleryApplicationVersion.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -596,7 +596,7 @@ private Mono>> updateWithResponseAsync(String resource } else { galleryApplicationVersion.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -861,7 +861,7 @@ public Mono> getWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter galleryApplicationVersionName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -913,7 +913,7 @@ private Mono> getWithResponseAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter galleryApplicationVersionName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, galleryName, @@ -1026,7 +1026,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter galleryApplicationVersionName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1075,7 +1075,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter galleryApplicationVersionName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1287,7 +1287,7 @@ private Mono> listByGalleryApplica return Mono.error( new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1334,7 +1334,7 @@ private Mono> listByGalleryApplica return Mono.error( new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryApplicationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryApplicationsClientImpl.java index 1a128eb283415..71a426ac56a01 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryApplicationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryApplicationsClientImpl.java @@ -178,7 +178,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { galleryApplication.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -233,7 +233,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { galleryApplication.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -482,7 +482,7 @@ public Mono>> updateWithResponseAsync(String resourceG } else { galleryApplication.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext( @@ -536,7 +536,7 @@ private Mono>> updateWithResponseAsync(String resource } else { galleryApplication.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -774,7 +774,7 @@ public Mono> getWithResponseAsync(String resou return Mono.error( new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -818,7 +818,7 @@ private Mono> getWithResponseAsync(String reso return Mono.error( new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, galleryName, @@ -916,7 +916,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error( new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -959,7 +959,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1148,7 +1148,7 @@ private Mono> listByGallerySinglePageAsyn if (galleryName == null) { return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByGallery(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1189,7 +1189,7 @@ private Mono> listByGallerySinglePageAsyn if (galleryName == null) { return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImageVersionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImageVersionsClientImpl.java index d76fbe5692b58..69b727dbe7f7d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImageVersionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImageVersionsClientImpl.java @@ -190,7 +190,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { galleryImageVersion.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -249,7 +249,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { galleryImageVersion.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -506,7 +506,7 @@ public Mono>> updateWithResponseAsync(String resourceG } else { galleryImageVersion.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -565,7 +565,7 @@ private Mono>> updateWithResponseAsync(String resource } else { galleryImageVersion.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -813,7 +813,7 @@ public Mono> getWithResponseAsync(String reso return Mono.error( new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext( @@ -863,7 +863,7 @@ private Mono> getWithResponseAsync(String res return Mono.error( new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, galleryName, @@ -971,7 +971,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error( new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1018,7 +1018,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1218,7 +1218,7 @@ private Mono> listByGalleryImageSinglePa return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1265,7 +1265,7 @@ private Mono> listByGalleryImageSinglePa return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImagesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImagesClientImpl.java index f539db8d8c85a..1dec380365b2f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImagesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImagesClientImpl.java @@ -174,7 +174,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { galleryImage.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -225,7 +225,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { galleryImage.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -455,7 +455,7 @@ public Mono>> updateWithResponseAsync(String resourceG } else { galleryImage.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -505,7 +505,7 @@ private Mono>> updateWithResponseAsync(String resource } else { galleryImage.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -718,7 +718,7 @@ public Mono> getWithResponseAsync(String resourceGro return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -761,7 +761,7 @@ private Mono> getWithResponseAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, galleryName, @@ -854,7 +854,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -896,7 +896,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1076,7 +1076,7 @@ private Mono> listByGallerySinglePageAsync(Stri if (galleryName == null) { return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByGallery(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1116,7 +1116,7 @@ private Mono> listByGallerySinglePageAsync(Stri if (galleryName == null) { return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryInVMAccessControlProfileVersionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryInVMAccessControlProfileVersionsClientImpl.java new file mode 100644 index 0000000000000..40eeca0c5b0be --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryInVMAccessControlProfileVersionsClientImpl.java @@ -0,0 +1,1539 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.compute.fluent.GalleryInVMAccessControlProfileVersionsClient; +import com.azure.resourcemanager.compute.fluent.models.GalleryInVMAccessControlProfileVersionInner; +import com.azure.resourcemanager.compute.models.ApiErrorException; +import com.azure.resourcemanager.compute.models.GalleryInVMAccessControlProfileVersionList; +import com.azure.resourcemanager.compute.models.GalleryInVMAccessControlProfileVersionUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * GalleryInVMAccessControlProfileVersionsClient. + */ +public final class GalleryInVMAccessControlProfileVersionsClientImpl + implements GalleryInVMAccessControlProfileVersionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final GalleryInVMAccessControlProfileVersionsService service; + + /** + * The service client containing this operation class. + */ + private final ComputeManagementClientImpl client; + + /** + * Initializes an instance of GalleryInVMAccessControlProfileVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GalleryInVMAccessControlProfileVersionsClientImpl(ComputeManagementClientImpl client) { + this.service = RestProxy.create(GalleryInVMAccessControlProfileVersionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ComputeManagementClientGalleryInVMAccessControlProfileVersions to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ComputeManagementCli") + public interface GalleryInVMAccessControlProfileVersionsService { + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("galleryName") String galleryName, + @PathParam("inVMAccessControlProfileName") String inVMAccessControlProfileName, + @PathParam("inVMAccessControlProfileVersionName") String inVMAccessControlProfileVersionName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("galleryName") String galleryName, + @PathParam("inVMAccessControlProfileName") String inVMAccessControlProfileName, + @PathParam("inVMAccessControlProfileVersionName") String inVMAccessControlProfileVersionName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("galleryName") String galleryName, + @PathParam("inVMAccessControlProfileName") String inVMAccessControlProfileName, + @PathParam("inVMAccessControlProfileVersionName") String inVMAccessControlProfileVersionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("galleryName") String galleryName, + @PathParam("inVMAccessControlProfileName") String inVMAccessControlProfileName, + @PathParam("inVMAccessControlProfileVersionName") String inVMAccessControlProfileVersionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono> listByGalleryInVMAccessControlProfile( + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("galleryName") String galleryName, + @PathParam("inVMAccessControlProfileName") String inVMAccessControlProfileName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono> listByGalleryInVMAccessControlProfileNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String galleryName, String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + if (inVMAccessControlProfileVersionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter inVMAccessControlProfileVersionName is required and cannot be null.")); + } + if (galleryInVMAccessControlProfileVersion == null) { + return Mono.error(new IllegalArgumentException( + "Parameter galleryInVMAccessControlProfileVersion is required and cannot be null.")); + } else { + galleryInVMAccessControlProfileVersion.validate(); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryName, inVMAccessControlProfileName, inVMAccessControlProfileVersionName, + apiVersion, galleryInVMAccessControlProfileVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String galleryName, String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + if (inVMAccessControlProfileVersionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter inVMAccessControlProfileVersionName is required and cannot be null.")); + } + if (galleryInVMAccessControlProfileVersion == null) { + return Mono.error(new IllegalArgumentException( + "Parameter galleryInVMAccessControlProfileVersion is required and cannot be null.")); + } else { + galleryInVMAccessControlProfileVersion.validate(); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + galleryName, inVMAccessControlProfileName, inVMAccessControlProfileVersionName, apiVersion, + galleryInVMAccessControlProfileVersion, accept, context); + } + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + PollerFlux, GalleryInVMAccessControlProfileVersionInner> + beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, galleryName, + inVMAccessControlProfileName, inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), GalleryInVMAccessControlProfileVersionInner.class, + GalleryInVMAccessControlProfileVersionInner.class, this.client.getContext()); + } + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, GalleryInVMAccessControlProfileVersionInner> + beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion, context); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), GalleryInVMAccessControlProfileVersionInner.class, + GalleryInVMAccessControlProfileVersionInner.class, context); + } + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, GalleryInVMAccessControlProfileVersionInner> + beginCreateOrUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion) + .getSyncPoller(); + } + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, GalleryInVMAccessControlProfileVersionInner> + beginCreateOrUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion, context) + .getSyncPoller(); + } + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, + String galleryName, String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion) { + return beginCreateOrUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String galleryName, String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GalleryInVMAccessControlProfileVersionInner createOrUpdate(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion) { + return createOrUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion).block(); + } + + /** + * Create or update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be created. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the create or update gallery + * inVMAccessControlProfile version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GalleryInVMAccessControlProfileVersionInner createOrUpdate(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionInner galleryInVMAccessControlProfileVersion, Context context) { + return createOrUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion, context).block(); + } + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + if (inVMAccessControlProfileVersionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter inVMAccessControlProfileVersionName is required and cannot be null.")); + } + if (galleryInVMAccessControlProfileVersion == null) { + return Mono.error(new IllegalArgumentException( + "Parameter galleryInVMAccessControlProfileVersion is required and cannot be null.")); + } else { + galleryInVMAccessControlProfileVersion.validate(); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryName, inVMAccessControlProfileName, inVMAccessControlProfileVersionName, + apiVersion, galleryInVMAccessControlProfileVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + if (inVMAccessControlProfileVersionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter inVMAccessControlProfileVersionName is required and cannot be null.")); + } + if (galleryInVMAccessControlProfileVersion == null) { + return Mono.error(new IllegalArgumentException( + "Parameter galleryInVMAccessControlProfileVersion is required and cannot be null.")); + } else { + galleryInVMAccessControlProfileVersion.validate(); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + galleryName, inVMAccessControlProfileName, inVMAccessControlProfileVersionName, apiVersion, + galleryInVMAccessControlProfileVersion, accept, context); + } + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + PollerFlux, GalleryInVMAccessControlProfileVersionInner> + beginUpdateAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, galleryName, + inVMAccessControlProfileName, inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), GalleryInVMAccessControlProfileVersionInner.class, + GalleryInVMAccessControlProfileVersionInner.class, this.client.getContext()); + } + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, GalleryInVMAccessControlProfileVersionInner> + beginUpdateAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion, context); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), GalleryInVMAccessControlProfileVersionInner.class, + GalleryInVMAccessControlProfileVersionInner.class, context); + } + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, GalleryInVMAccessControlProfileVersionInner> + beginUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion) { + return this + .beginUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion) + .getSyncPoller(); + } + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * version that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, GalleryInVMAccessControlProfileVersionInner> + beginUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion, Context context) { + return this + .beginUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion, context) + .getSyncPoller(); + } + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion) { + return beginUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion, Context context) { + return beginUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GalleryInVMAccessControlProfileVersionInner update(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion) { + return updateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion).block(); + } + + /** + * Update a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version is to be updated. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must + * be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + * @param galleryInVMAccessControlProfileVersion Parameters supplied to the update gallery inVMAccessControlProfile + * version operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GalleryInVMAccessControlProfileVersionInner update(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + GalleryInVMAccessControlProfileVersionUpdate galleryInVMAccessControlProfileVersion, Context context) { + return updateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, galleryInVMAccessControlProfileVersion, context).block(); + } + + /** + * Retrieves information about a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String galleryName, String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + if (inVMAccessControlProfileVersionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter inVMAccessControlProfileVersionName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryName, inVMAccessControlProfileName, inVMAccessControlProfileVersionName, + apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves information about a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * retrieved. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String galleryName, String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + if (inVMAccessControlProfileVersionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter inVMAccessControlProfileVersionName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, galleryName, + inVMAccessControlProfileName, inVMAccessControlProfileVersionName, apiVersion, accept, context); + } + + /** + * Retrieves information about a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName) { + return getWithResponseAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves information about a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * retrieved. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String galleryName, String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, + Context context) { + return getWithResponseAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, context).block(); + } + + /** + * Retrieves information about a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile version that you want to create or + * update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GalleryInVMAccessControlProfileVersionInner get(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName) { + return getWithResponse(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, Context.NONE).getValue(); + } + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + if (inVMAccessControlProfileVersionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter inVMAccessControlProfileVersionName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryName, inVMAccessControlProfileName, inVMAccessControlProfileVersionName, + apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + if (inVMAccessControlProfileVersionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter inVMAccessControlProfileVersionName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + galleryName, inVMAccessControlProfileName, inVMAccessControlProfileVersionName, apiVersion, accept, + context); + } + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, galleryName, + inVMAccessControlProfileName, inVMAccessControlProfileVersionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, galleryName, + inVMAccessControlProfileName, inVMAccessControlProfileVersionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName) { + return this + .beginDeleteAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName) + .getSyncPoller(); + } + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, String inVMAccessControlProfileVersionName, Context context) { + return this + .beginDeleteAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, context) + .getSyncPoller(); + } + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName) { + return beginDeleteAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, Context context) { + return beginDeleteAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + inVMAccessControlProfileVersionName, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName) { + deleteAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, inVMAccessControlProfileVersionName) + .block(); + } + + /** + * Delete a gallery inVMAccessControlProfile version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile in which the + * inVMAccessControlProfile version resides. + * @param inVMAccessControlProfileVersionName The name of the gallery inVMAccessControlProfile version to be + * deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + String inVMAccessControlProfileVersionName, Context context) { + deleteAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, inVMAccessControlProfileVersionName, + context).block(); + } + + /** + * List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile from which the + * inVMAccessControlProfile versions are to be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfile Versions operation response along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByGalleryInVMAccessControlProfileSinglePageAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByGalleryInVMAccessControlProfile(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, galleryName, inVMAccessControlProfileName, + apiVersion, accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile from which the + * inVMAccessControlProfile versions are to be listed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfile Versions operation response along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByGalleryInVMAccessControlProfileSinglePageAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByGalleryInVMAccessControlProfile(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryName, inVMAccessControlProfileName, apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile from which the + * inVMAccessControlProfile versions are to be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfile Versions operation response as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByGalleryInVMAccessControlProfileAsync( + String resourceGroupName, String galleryName, String inVMAccessControlProfileName) { + return new PagedFlux<>( + () -> listByGalleryInVMAccessControlProfileSinglePageAsync(resourceGroupName, galleryName, + inVMAccessControlProfileName), + nextLink -> listByGalleryInVMAccessControlProfileNextSinglePageAsync(nextLink)); + } + + /** + * List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile from which the + * inVMAccessControlProfile versions are to be listed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfile Versions operation response as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByGalleryInVMAccessControlProfileAsync( + String resourceGroupName, String galleryName, String inVMAccessControlProfileName, Context context) { + return new PagedFlux<>( + () -> listByGalleryInVMAccessControlProfileSinglePageAsync(resourceGroupName, galleryName, + inVMAccessControlProfileName, context), + nextLink -> listByGalleryInVMAccessControlProfileNextSinglePageAsync(nextLink, context)); + } + + /** + * List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile from which the + * inVMAccessControlProfile versions are to be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfile Versions operation response as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByGalleryInVMAccessControlProfile( + String resourceGroupName, String galleryName, String inVMAccessControlProfileName) { + return new PagedIterable<>( + listByGalleryInVMAccessControlProfileAsync(resourceGroupName, galleryName, inVMAccessControlProfileName)); + } + + /** + * List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile from which the + * inVMAccessControlProfile versions are to be listed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfile Versions operation response as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByGalleryInVMAccessControlProfile( + String resourceGroupName, String galleryName, String inVMAccessControlProfileName, Context context) { + return new PagedIterable<>(listByGalleryInVMAccessControlProfileAsync(resourceGroupName, galleryName, + inVMAccessControlProfileName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfile Versions operation response along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByGalleryInVMAccessControlProfileNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByGalleryInVMAccessControlProfileNext(nextLink, + this.client.getEndpoint(), accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfile Versions operation response along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByGalleryInVMAccessControlProfileNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByGalleryInVMAccessControlProfileNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryInVMAccessControlProfilesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryInVMAccessControlProfilesClientImpl.java new file mode 100644 index 0000000000000..cb0ace857ddf0 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryInVMAccessControlProfilesClientImpl.java @@ -0,0 +1,1340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.compute.fluent.GalleryInVMAccessControlProfilesClient; +import com.azure.resourcemanager.compute.fluent.models.GalleryInVMAccessControlProfileInner; +import com.azure.resourcemanager.compute.models.ApiErrorException; +import com.azure.resourcemanager.compute.models.GalleryInVMAccessControlProfileList; +import com.azure.resourcemanager.compute.models.GalleryInVMAccessControlProfileUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in GalleryInVMAccessControlProfilesClient. + */ +public final class GalleryInVMAccessControlProfilesClientImpl implements GalleryInVMAccessControlProfilesClient { + /** + * The proxy service used to perform REST calls. + */ + private final GalleryInVMAccessControlProfilesService service; + + /** + * The service client containing this operation class. + */ + private final ComputeManagementClientImpl client; + + /** + * Initializes an instance of GalleryInVMAccessControlProfilesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GalleryInVMAccessControlProfilesClientImpl(ComputeManagementClientImpl client) { + this.service = RestProxy.create(GalleryInVMAccessControlProfilesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ComputeManagementClientGalleryInVMAccessControlProfiles to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ComputeManagementCli") + public interface GalleryInVMAccessControlProfilesService { + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("galleryName") String galleryName, + @PathParam("inVMAccessControlProfileName") String inVMAccessControlProfileName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("galleryName") String galleryName, + @PathParam("inVMAccessControlProfileName") String inVMAccessControlProfileName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("galleryName") String galleryName, + @PathParam("inVMAccessControlProfileName") String inVMAccessControlProfileName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("galleryName") String galleryName, + @PathParam("inVMAccessControlProfileName") String inVMAccessControlProfileName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono> listByGallery(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("galleryName") String galleryName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono> listByGalleryNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + if (galleryInVMAccessControlProfile == null) { + return Mono.error(new IllegalArgumentException( + "Parameter galleryInVMAccessControlProfile is required and cannot be null.")); + } else { + galleryInVMAccessControlProfile.validate(); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryName, inVMAccessControlProfileName, apiVersion, + galleryInVMAccessControlProfile, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + if (galleryInVMAccessControlProfile == null) { + return Mono.error(new IllegalArgumentException( + "Parameter galleryInVMAccessControlProfile is required and cannot be null.")); + } else { + galleryInVMAccessControlProfile.validate(); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + galleryName, inVMAccessControlProfileName, apiVersion, galleryInVMAccessControlProfile, accept, context); + } + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, GalleryInVMAccessControlProfileInner> + beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, galleryName, + inVMAccessControlProfileName, galleryInVMAccessControlProfile); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), GalleryInVMAccessControlProfileInner.class, + GalleryInVMAccessControlProfileInner.class, this.client.getContext()); + } + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, GalleryInVMAccessControlProfileInner> + beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, galleryName, + inVMAccessControlProfileName, galleryInVMAccessControlProfile, context); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), GalleryInVMAccessControlProfileInner.class, + GalleryInVMAccessControlProfileInner.class, context); + } + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, GalleryInVMAccessControlProfileInner> + beginCreateOrUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + galleryInVMAccessControlProfile) + .getSyncPoller(); + } + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, GalleryInVMAccessControlProfileInner> + beginCreateOrUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + galleryInVMAccessControlProfile, context) + .getSyncPoller(); + } + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile) { + return beginCreateOrUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + galleryInVMAccessControlProfile).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + galleryInVMAccessControlProfile, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GalleryInVMAccessControlProfileInner createOrUpdate(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile) { + return createOrUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + galleryInVMAccessControlProfile).block(); + } + + /** + * Create or update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be created or updated. + * The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the create or update gallery + * inVMAccessControlProfile operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GalleryInVMAccessControlProfileInner createOrUpdate(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileInner galleryInVMAccessControlProfile, + Context context) { + return createOrUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + galleryInVMAccessControlProfile, context).block(); + } + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + if (galleryInVMAccessControlProfile == null) { + return Mono.error(new IllegalArgumentException( + "Parameter galleryInVMAccessControlProfile is required and cannot be null.")); + } else { + galleryInVMAccessControlProfile.validate(); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryName, inVMAccessControlProfileName, apiVersion, + galleryInVMAccessControlProfile, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + if (galleryInVMAccessControlProfile == null) { + return Mono.error(new IllegalArgumentException( + "Parameter galleryInVMAccessControlProfile is required and cannot be null.")); + } else { + galleryInVMAccessControlProfile.validate(); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + galleryName, inVMAccessControlProfileName, apiVersion, galleryInVMAccessControlProfile, accept, context); + } + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, GalleryInVMAccessControlProfileInner> + beginUpdateAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, galleryName, + inVMAccessControlProfileName, galleryInVMAccessControlProfile); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), GalleryInVMAccessControlProfileInner.class, + GalleryInVMAccessControlProfileInner.class, this.client.getContext()); + } + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, GalleryInVMAccessControlProfileInner> + beginUpdateAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, galleryName, + inVMAccessControlProfileName, galleryInVMAccessControlProfile, context); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), GalleryInVMAccessControlProfileInner.class, + GalleryInVMAccessControlProfileInner.class, context); + } + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, GalleryInVMAccessControlProfileInner> + beginUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile) { + return this + .beginUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + galleryInVMAccessControlProfile) + .getSyncPoller(); + } + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of specifies information about the gallery inVMAccessControlProfile + * that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, GalleryInVMAccessControlProfileInner> + beginUpdate(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile, Context context) { + return this + .beginUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + galleryInVMAccessControlProfile, context) + .getSyncPoller(); + } + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile) { + return beginUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + galleryInVMAccessControlProfile).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile, + Context context) { + return beginUpdateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + galleryInVMAccessControlProfile, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GalleryInVMAccessControlProfileInner update(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile) { + return updateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + galleryInVMAccessControlProfile).block(); + } + + /** + * Update a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is + * 80 characters. + * @param galleryInVMAccessControlProfile Parameters supplied to the update gallery inVMAccessControlProfile + * operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GalleryInVMAccessControlProfileInner update(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, GalleryInVMAccessControlProfileUpdate galleryInVMAccessControlProfile, + Context context) { + return updateAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, + galleryInVMAccessControlProfile, context).block(); + } + + /** + * Retrieves information about a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * retrieved. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String galleryName, String inVMAccessControlProfileName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryName, inVMAccessControlProfileName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves information about a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * retrieved. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be retrieved. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String galleryName, String inVMAccessControlProfileName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, galleryName, + inVMAccessControlProfileName, apiVersion, accept, context); + } + + /** + * Retrieves information about a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * retrieved. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName) { + return getWithResponseAsync(resourceGroupName, galleryName, inVMAccessControlProfileName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves information about a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * retrieved. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be retrieved. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, Context context) { + return getWithResponseAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, context).block(); + } + + /** + * Retrieves information about a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * retrieved. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specifies information about the gallery inVMAccessControlProfile that you want to create or update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GalleryInVMAccessControlProfileInner get(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName) { + return getWithResponse(resourceGroupName, galleryName, inVMAccessControlProfileName, Context.NONE).getValue(); + } + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryName, inVMAccessControlProfileName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (inVMAccessControlProfileName == null) { + return Mono.error( + new IllegalArgumentException("Parameter inVMAccessControlProfileName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + galleryName, inVMAccessControlProfileName, apiVersion, accept, context); + } + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, galleryName, inVMAccessControlProfileName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName) { + return this.beginDeleteAsync(resourceGroupName, galleryName, inVMAccessControlProfileName).getSyncPoller(); + } + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String galleryName, + String inVMAccessControlProfileName, Context context) { + return this.beginDeleteAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, context) + .getSyncPoller(); + } + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName) { + return beginDeleteAsync(resourceGroupName, galleryName, inVMAccessControlProfileName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + Context context) { + return beginDeleteAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String galleryName, String inVMAccessControlProfileName) { + deleteAsync(resourceGroupName, galleryName, inVMAccessControlProfileName).block(); + } + + /** + * Delete a gallery inVMAccessControlProfile. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + * @param inVMAccessControlProfileName The name of the gallery inVMAccessControlProfile to be deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String galleryName, String inVMAccessControlProfileName, + Context context) { + deleteAsync(resourceGroupName, galleryName, inVMAccessControlProfileName, context).block(); + } + + /** + * List gallery inVMAccessControlProfiles in a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * listed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfiles operation response along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByGallerySinglePageAsync(String resourceGroupName, String galleryName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByGallery(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List gallery inVMAccessControlProfiles in a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * listed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfiles operation response along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByGallerySinglePageAsync(String resourceGroupName, String galleryName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByGallery(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, galleryName, + apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List gallery inVMAccessControlProfiles in a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * listed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfiles operation response as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByGalleryAsync(String resourceGroupName, + String galleryName) { + return new PagedFlux<>(() -> listByGallerySinglePageAsync(resourceGroupName, galleryName), + nextLink -> listByGalleryNextSinglePageAsync(nextLink)); + } + + /** + * List gallery inVMAccessControlProfiles in a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * listed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfiles operation response as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByGalleryAsync(String resourceGroupName, + String galleryName, Context context) { + return new PagedFlux<>(() -> listByGallerySinglePageAsync(resourceGroupName, galleryName, context), + nextLink -> listByGalleryNextSinglePageAsync(nextLink, context)); + } + + /** + * List gallery inVMAccessControlProfiles in a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * listed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfiles operation response as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByGallery(String resourceGroupName, + String galleryName) { + return new PagedIterable<>(listByGalleryAsync(resourceGroupName, galleryName)); + } + + /** + * List gallery inVMAccessControlProfiles in a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be + * listed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfiles operation response as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByGallery(String resourceGroupName, + String galleryName, Context context) { + return new PagedIterable<>(listByGalleryAsync(resourceGroupName, galleryName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfiles operation response along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByGalleryNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByGalleryNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Gallery InVMAccessControlProfiles operation response along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByGalleryNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByGalleryNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GallerySharingProfilesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GallerySharingProfilesClientImpl.java index 16c8f98a188d0..301290809d057 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GallerySharingProfilesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GallerySharingProfilesClientImpl.java @@ -110,7 +110,7 @@ public Mono>> updateWithResponseAsync(String resourceG } else { sharingUpdate.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -154,7 +154,7 @@ private Mono>> updateWithResponseAsync(String resource } else { sharingUpdate.validate(); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleriesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleriesClientImpl.java index 87632d02304bb..f388eaafe0a16 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleriesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleriesClientImpl.java @@ -113,7 +113,7 @@ private Mono> listSinglePageAsync(String locat if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -149,7 +149,7 @@ private Mono> listSinglePageAsync(String locat if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -267,7 +267,7 @@ public Mono> getWithResponseAsync(String location, return Mono .error(new IllegalArgumentException("Parameter galleryUniqueName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -305,7 +305,7 @@ private Mono> getWithResponseAsync(String location, return Mono .error(new IllegalArgumentException("Parameter galleryUniqueName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, galleryUniqueName, diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryImageVersionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryImageVersionsClientImpl.java index 97942fe06783f..768125dd9cebc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryImageVersionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryImageVersionsClientImpl.java @@ -129,7 +129,7 @@ private Mono> listSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -176,7 +176,7 @@ private Mono> listSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -331,7 +331,7 @@ public Mono> getWithResponseAsync(Strin return Mono.error( new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -382,7 +382,7 @@ private Mono> getWithResponseAsync(Stri return Mono.error( new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, apiVersion, diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryImagesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryImagesClientImpl.java index d3e911ef2afcc..0956509c8b51c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryImagesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryImagesClientImpl.java @@ -120,7 +120,7 @@ private Mono> listSinglePageAsync(String return Mono .error(new IllegalArgumentException("Parameter galleryUniqueName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -161,7 +161,7 @@ private Mono> listSinglePageAsync(String return Mono .error(new IllegalArgumentException("Parameter galleryUniqueName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -294,7 +294,7 @@ public Mono> getWithResponseAsync(String locat return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -338,7 +338,7 @@ private Mono> getWithResponseAsync(String loca return Mono .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } - final String apiVersion = "2023-07-03"; + final String apiVersion = "2024-03-03"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, apiVersion, diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SoftDeletedResourcesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SoftDeletedResourcesClientImpl.java new file mode 100644 index 0000000000000..812b243674f24 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SoftDeletedResourcesClientImpl.java @@ -0,0 +1,326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.compute.fluent.SoftDeletedResourcesClient; +import com.azure.resourcemanager.compute.fluent.models.GallerySoftDeletedResourceInner; +import com.azure.resourcemanager.compute.models.ApiErrorException; +import com.azure.resourcemanager.compute.models.GallerySoftDeletedResourceList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SoftDeletedResourcesClient. + */ +public final class SoftDeletedResourcesClientImpl implements SoftDeletedResourcesClient { + /** + * The proxy service used to perform REST calls. + */ + private final SoftDeletedResourcesService service; + + /** + * The service client containing this operation class. + */ + private final ComputeManagementClientImpl client; + + /** + * Initializes an instance of SoftDeletedResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SoftDeletedResourcesClientImpl(ComputeManagementClientImpl client) { + this.service = RestProxy.create(SoftDeletedResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ComputeManagementClientSoftDeletedResources to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ComputeManagementCli") + public interface SoftDeletedResourcesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/softDeletedArtifactTypes/{artifactType}/artifacts/{artifactName}/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono> listByArtifactName(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("galleryName") String galleryName, + @PathParam("artifactType") String artifactType, @PathParam("artifactName") String artifactName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ApiErrorException.class) + Mono> listByArtifactNameNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an + * image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Gallery in which the soft-deleted resources resides. + * @param artifactType The type of the artifact to be listed, such as gallery image version. + * @param artifactName The artifact name to be listed. If artifact type is Images, then the artifact name should be + * the gallery image name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Soft-deleted Resources operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByArtifactNameSinglePageAsync( + String resourceGroupName, String galleryName, String artifactType, String artifactName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (artifactType == null) { + return Mono.error(new IllegalArgumentException("Parameter artifactType is required and cannot be null.")); + } + if (artifactName == null) { + return Mono.error(new IllegalArgumentException("Parameter artifactName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByArtifactName(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryName, artifactType, artifactName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an + * image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Gallery in which the soft-deleted resources resides. + * @param artifactType The type of the artifact to be listed, such as gallery image version. + * @param artifactName The artifact name to be listed. If artifact type is Images, then the artifact name should be + * the gallery image name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Soft-deleted Resources operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByArtifactNameSinglePageAsync( + String resourceGroupName, String galleryName, String artifactType, String artifactName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (galleryName == null) { + return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); + } + if (artifactType == null) { + return Mono.error(new IllegalArgumentException("Parameter artifactType is required and cannot be null.")); + } + if (artifactName == null) { + return Mono.error(new IllegalArgumentException("Parameter artifactName is required and cannot be null.")); + } + final String apiVersion = "2024-03-03"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByArtifactName(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + galleryName, artifactType, artifactName, apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an + * image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Gallery in which the soft-deleted resources resides. + * @param artifactType The type of the artifact to be listed, such as gallery image version. + * @param artifactName The artifact name to be listed. If artifact type is Images, then the artifact name should be + * the gallery image name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Soft-deleted Resources operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByArtifactNameAsync(String resourceGroupName, + String galleryName, String artifactType, String artifactName) { + return new PagedFlux<>( + () -> listByArtifactNameSinglePageAsync(resourceGroupName, galleryName, artifactType, artifactName), + nextLink -> listByArtifactNameNextSinglePageAsync(nextLink)); + } + + /** + * List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an + * image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Gallery in which the soft-deleted resources resides. + * @param artifactType The type of the artifact to be listed, such as gallery image version. + * @param artifactName The artifact name to be listed. If artifact type is Images, then the artifact name should be + * the gallery image name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Soft-deleted Resources operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByArtifactNameAsync(String resourceGroupName, + String galleryName, String artifactType, String artifactName, Context context) { + return new PagedFlux<>(() -> listByArtifactNameSinglePageAsync(resourceGroupName, galleryName, artifactType, + artifactName, context), nextLink -> listByArtifactNameNextSinglePageAsync(nextLink, context)); + } + + /** + * List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an + * image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Gallery in which the soft-deleted resources resides. + * @param artifactType The type of the artifact to be listed, such as gallery image version. + * @param artifactName The artifact name to be listed. If artifact type is Images, then the artifact name should be + * the gallery image name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Soft-deleted Resources operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByArtifactName(String resourceGroupName, + String galleryName, String artifactType, String artifactName) { + return new PagedIterable<>(listByArtifactNameAsync(resourceGroupName, galleryName, artifactType, artifactName)); + } + + /** + * List soft-deleted resources of an artifact in the gallery, such as soft-deleted gallery image version of an + * image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Gallery in which the soft-deleted resources resides. + * @param artifactType The type of the artifact to be listed, such as gallery image version. + * @param artifactName The artifact name to be listed. If artifact type is Images, then the artifact name should be + * the gallery image name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Soft-deleted Resources operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByArtifactName(String resourceGroupName, + String galleryName, String artifactType, String artifactName, Context context) { + return new PagedIterable<>( + listByArtifactNameAsync(resourceGroupName, galleryName, artifactType, artifactName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Soft-deleted Resources operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByArtifactNameNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByArtifactNameNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ApiErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Soft-deleted Resources operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByArtifactNameNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByArtifactNameNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SshPublicKeysClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SshPublicKeysClientImpl.java index 80e1638b93646..5ce7fa33d06c4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SshPublicKeysClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SshPublicKeysClientImpl.java @@ -34,8 +34,8 @@ import com.azure.resourcemanager.compute.fluent.models.SshPublicKeyResourceInner; import com.azure.resourcemanager.compute.models.ApiErrorException; import com.azure.resourcemanager.compute.models.SshGenerateKeyPairInputParameters; -import com.azure.resourcemanager.compute.models.SshPublicKeysGroupListResult; import com.azure.resourcemanager.compute.models.SshPublicKeyUpdateResource; +import com.azure.resourcemanager.compute.models.SshPublicKeysGroupListResult; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineRunCommandsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineRunCommandsClientImpl.java index 36a84b82862a3..8d74f518baa97 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineRunCommandsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineRunCommandsClientImpl.java @@ -38,8 +38,8 @@ import com.azure.resourcemanager.compute.fluent.models.VirtualMachineRunCommandInner; import com.azure.resourcemanager.compute.models.ApiErrorException; import com.azure.resourcemanager.compute.models.RunCommandListResult; -import com.azure.resourcemanager.compute.models.VirtualMachineRunCommandsListResult; import com.azure.resourcemanager.compute.models.VirtualMachineRunCommandUpdate; +import com.azure.resourcemanager.compute.models.VirtualMachineRunCommandsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMRunCommandsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMRunCommandsClientImpl.java index 2b56acc9703ea..17455831d12bb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMRunCommandsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMRunCommandsClientImpl.java @@ -34,8 +34,8 @@ import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetVMRunCommandsClient; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineRunCommandInner; import com.azure.resourcemanager.compute.models.ApiErrorException; -import com.azure.resourcemanager.compute.models.VirtualMachineRunCommandsListResult; import com.azure.resourcemanager.compute.models.VirtualMachineRunCommandUpdate; +import com.azure.resourcemanager.compute.models.VirtualMachineRunCommandsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMsClientImpl.java index 70bbfcdcc9cc0..95f21dee5eeb1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMsClientImpl.java @@ -2358,7 +2358,8 @@ public PagedIterable list(String resourceGroupNam /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2401,7 +2402,8 @@ public Mono>> powerOffWithResponseAsync(String resourc /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2444,7 +2446,8 @@ private Mono>> powerOffWithResponseAsync(String resour /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2467,7 +2470,8 @@ public PollerFlux, Void> beginPowerOffAsync(String resourceGrou /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2489,7 +2493,8 @@ public PollerFlux, Void> beginPowerOffAsync(String resourceGrou /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2514,7 +2519,8 @@ private PollerFlux, Void> beginPowerOffAsync(String resourceGro /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2533,7 +2539,8 @@ public SyncPoller, Void> beginPowerOff(String resourceGroupName /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2555,7 +2562,8 @@ public SyncPoller, Void> beginPowerOff(String resourceGroupName /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2576,7 +2584,8 @@ public Mono powerOffAsync(String resourceGroupName, String vmScaleSetName, /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2595,7 +2604,8 @@ public Mono powerOffAsync(String resourceGroupName, String vmScaleSetName, /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2617,7 +2627,8 @@ private Mono powerOffAsync(String resourceGroupName, String vmScaleSetName /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2634,7 +2645,8 @@ public void powerOff(String resourceGroupName, String vmScaleSetName, String ins /** * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. + * charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this + * operation is not allowed on a virtual machine that is being deallocated or already has been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetsClientImpl.java index d61a0ae25932f..92ca0c516f835 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetsClientImpl.java @@ -41,6 +41,7 @@ import com.azure.resourcemanager.compute.models.ApiErrorException; import com.azure.resourcemanager.compute.models.ExpandTypesForGetVMScaleSets; import com.azure.resourcemanager.compute.models.OrchestrationServiceStateInput; +import com.azure.resourcemanager.compute.models.VMScaleSetConvertToSinglePlacementGroupInput; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetListOSUpgradeHistory; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetListResult; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetListSkusResult; @@ -49,7 +50,6 @@ import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetUpdate; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMInstanceIDs; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMInstanceRequiredIDs; -import com.azure.resourcemanager.compute.models.VMScaleSetConvertToSinglePlacementGroupInput; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; @@ -2826,6 +2826,8 @@ public PagedIterable getOSUpgradeHist /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2869,6 +2871,8 @@ public Mono>> powerOffWithResponseAsync(String resourc /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2912,6 +2916,8 @@ private Mono>> powerOffWithResponseAsync(String resour /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2935,6 +2941,8 @@ public PollerFlux, Void> beginPowerOffAsync(String resourceGrou /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2956,6 +2964,8 @@ public PollerFlux, Void> beginPowerOffAsync(String resourceGrou /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2981,6 +2991,8 @@ private PollerFlux, Void> beginPowerOffAsync(String resourceGro /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2999,6 +3011,8 @@ public SyncPoller, Void> beginPowerOff(String resourceGroupName /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -3021,6 +3035,8 @@ public SyncPoller, Void> beginPowerOff(String resourceGroupName /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -3042,6 +3058,8 @@ public Mono powerOffAsync(String resourceGroupName, String vmScaleSetName, /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -3061,6 +3079,8 @@ public Mono powerOffAsync(String resourceGroupName, String vmScaleSetName) /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -3083,6 +3103,8 @@ private Mono powerOffAsync(String resourceGroupName, String vmScaleSetName /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -3100,6 +3122,8 @@ public void powerOff(String resourceGroupName, String vmScaleSetName) { /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + * Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or + * have already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java index 1c15d4304b8b0..fc0b947bbe076 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java @@ -3000,7 +3000,8 @@ public PagedIterable listAvailableSizes(String resource /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -3039,7 +3040,8 @@ public Mono>> powerOffWithResponseAsync(String resourc /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -3078,7 +3080,8 @@ private Mono>> powerOffWithResponseAsync(String resour /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -3099,7 +3102,8 @@ public PollerFlux, Void> beginPowerOffAsync(String resourceGrou /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -3118,7 +3122,8 @@ public PollerFlux, Void> beginPowerOffAsync(String resourceGrou /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -3142,7 +3147,8 @@ private PollerFlux, Void> beginPowerOffAsync(String resourceGro /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -3159,7 +3165,8 @@ public SyncPoller, Void> beginPowerOff(String resourceGroupName /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -3179,7 +3186,8 @@ public SyncPoller, Void> beginPowerOff(String resourceGroupName /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -3198,7 +3206,8 @@ public Mono powerOffAsync(String resourceGroupName, String vmName, Boolean /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -3216,7 +3225,8 @@ public Mono powerOffAsync(String resourceGroupName, String vmName) { /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -3236,7 +3246,8 @@ private Mono powerOffAsync(String resourceGroupName, String vmName, Boolea /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -3252,7 +3263,8 @@ public void powerOff(String resourceGroupName, String vmName) { /** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. + * provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a + * virtual machine that is being deallocated or has already been deallocated. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRules.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRules.java new file mode 100644 index 0000000000000..5787f7cb20a05 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRules.java @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * This is the Access Control Rules specification for an inVMAccessControlProfile version. + */ +@Fluent +public final class AccessControlRules implements JsonSerializable { + /* + * A list of privileges. + */ + private List privileges; + + /* + * A list of roles. + */ + private List roles; + + /* + * A list of identities. + */ + private List identities; + + /* + * A list of role assignments. + */ + private List roleAssignments; + + /** + * Creates an instance of AccessControlRules class. + */ + public AccessControlRules() { + } + + /** + * Get the privileges property: A list of privileges. + * + * @return the privileges value. + */ + public List privileges() { + return this.privileges; + } + + /** + * Set the privileges property: A list of privileges. + * + * @param privileges the privileges value to set. + * @return the AccessControlRules object itself. + */ + public AccessControlRules withPrivileges(List privileges) { + this.privileges = privileges; + return this; + } + + /** + * Get the roles property: A list of roles. + * + * @return the roles value. + */ + public List roles() { + return this.roles; + } + + /** + * Set the roles property: A list of roles. + * + * @param roles the roles value to set. + * @return the AccessControlRules object itself. + */ + public AccessControlRules withRoles(List roles) { + this.roles = roles; + return this; + } + + /** + * Get the identities property: A list of identities. + * + * @return the identities value. + */ + public List identities() { + return this.identities; + } + + /** + * Set the identities property: A list of identities. + * + * @param identities the identities value to set. + * @return the AccessControlRules object itself. + */ + public AccessControlRules withIdentities(List identities) { + this.identities = identities; + return this; + } + + /** + * Get the roleAssignments property: A list of role assignments. + * + * @return the roleAssignments value. + */ + public List roleAssignments() { + return this.roleAssignments; + } + + /** + * Set the roleAssignments property: A list of role assignments. + * + * @param roleAssignments the roleAssignments value to set. + * @return the AccessControlRules object itself. + */ + public AccessControlRules withRoleAssignments(List roleAssignments) { + this.roleAssignments = roleAssignments; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privileges() != null) { + privileges().forEach(e -> e.validate()); + } + if (roles() != null) { + roles().forEach(e -> e.validate()); + } + if (identities() != null) { + identities().forEach(e -> e.validate()); + } + if (roleAssignments() != null) { + roleAssignments().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("privileges", this.privileges, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("roles", this.roles, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("identities", this.identities, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("roleAssignments", this.roleAssignments, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlRules from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlRules if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AccessControlRules. + */ + public static AccessControlRules fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlRules deserializedAccessControlRules = new AccessControlRules(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privileges".equals(fieldName)) { + List privileges + = reader.readArray(reader1 -> AccessControlRulesPrivilege.fromJson(reader1)); + deserializedAccessControlRules.privileges = privileges; + } else if ("roles".equals(fieldName)) { + List roles + = reader.readArray(reader1 -> AccessControlRulesRole.fromJson(reader1)); + deserializedAccessControlRules.roles = roles; + } else if ("identities".equals(fieldName)) { + List identities + = reader.readArray(reader1 -> AccessControlRulesIdentity.fromJson(reader1)); + deserializedAccessControlRules.identities = identities; + } else if ("roleAssignments".equals(fieldName)) { + List roleAssignments + = reader.readArray(reader1 -> AccessControlRulesRoleAssignment.fromJson(reader1)); + deserializedAccessControlRules.roleAssignments = roleAssignments; + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlRules; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesIdentity.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesIdentity.java new file mode 100644 index 0000000000000..1b028e7bfaca7 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesIdentity.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties of an Access Control Rule Identity. + */ +@Fluent +public final class AccessControlRulesIdentity implements JsonSerializable { + /* + * The name of the identity. + */ + private String name; + + /* + * The username corresponding to this identity. + */ + private String username; + + /* + * The groupName corresponding to this identity. + */ + private String groupName; + + /* + * The path to the executable. + */ + private String exePath; + + /* + * The process name of the executable. + */ + private String processName; + + /** + * Creates an instance of AccessControlRulesIdentity class. + */ + public AccessControlRulesIdentity() { + } + + /** + * Get the name property: The name of the identity. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the identity. + * + * @param name the name value to set. + * @return the AccessControlRulesIdentity object itself. + */ + public AccessControlRulesIdentity withName(String name) { + this.name = name; + return this; + } + + /** + * Get the username property: The username corresponding to this identity. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: The username corresponding to this identity. + * + * @param username the username value to set. + * @return the AccessControlRulesIdentity object itself. + */ + public AccessControlRulesIdentity withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the groupName property: The groupName corresponding to this identity. + * + * @return the groupName value. + */ + public String groupName() { + return this.groupName; + } + + /** + * Set the groupName property: The groupName corresponding to this identity. + * + * @param groupName the groupName value to set. + * @return the AccessControlRulesIdentity object itself. + */ + public AccessControlRulesIdentity withGroupName(String groupName) { + this.groupName = groupName; + return this; + } + + /** + * Get the exePath property: The path to the executable. + * + * @return the exePath value. + */ + public String exePath() { + return this.exePath; + } + + /** + * Set the exePath property: The path to the executable. + * + * @param exePath the exePath value to set. + * @return the AccessControlRulesIdentity object itself. + */ + public AccessControlRulesIdentity withExePath(String exePath) { + this.exePath = exePath; + return this; + } + + /** + * Get the processName property: The process name of the executable. + * + * @return the processName value. + */ + public String processName() { + return this.processName; + } + + /** + * Set the processName property: The process name of the executable. + * + * @param processName the processName value to set. + * @return the AccessControlRulesIdentity object itself. + */ + public AccessControlRulesIdentity withProcessName(String processName) { + this.processName = processName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property name in model AccessControlRulesIdentity")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AccessControlRulesIdentity.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("userName", this.username); + jsonWriter.writeStringField("groupName", this.groupName); + jsonWriter.writeStringField("exePath", this.exePath); + jsonWriter.writeStringField("processName", this.processName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlRulesIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlRulesIdentity if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AccessControlRulesIdentity. + */ + public static AccessControlRulesIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlRulesIdentity deserializedAccessControlRulesIdentity = new AccessControlRulesIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedAccessControlRulesIdentity.name = reader.getString(); + } else if ("userName".equals(fieldName)) { + deserializedAccessControlRulesIdentity.username = reader.getString(); + } else if ("groupName".equals(fieldName)) { + deserializedAccessControlRulesIdentity.groupName = reader.getString(); + } else if ("exePath".equals(fieldName)) { + deserializedAccessControlRulesIdentity.exePath = reader.getString(); + } else if ("processName".equals(fieldName)) { + deserializedAccessControlRulesIdentity.processName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlRulesIdentity; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesMode.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesMode.java new file mode 100644 index 0000000000000..45e850a5f555f --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesMode.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.compute.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or Disabled. + * Possible values are: 'Audit', 'Enforce' or 'Disabled'. + */ +public final class AccessControlRulesMode extends ExpandableStringEnum { + /** + * Static value Audit for AccessControlRulesMode. + */ + public static final AccessControlRulesMode AUDIT = fromString("Audit"); + + /** + * Static value Enforce for AccessControlRulesMode. + */ + public static final AccessControlRulesMode ENFORCE = fromString("Enforce"); + + /** + * Static value Disabled for AccessControlRulesMode. + */ + public static final AccessControlRulesMode DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of AccessControlRulesMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AccessControlRulesMode() { + } + + /** + * Creates or finds a AccessControlRulesMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding AccessControlRulesMode. + */ + public static AccessControlRulesMode fromString(String name) { + return fromString(name, AccessControlRulesMode.class); + } + + /** + * Gets known AccessControlRulesMode values. + * + * @return known AccessControlRulesMode values. + */ + public static Collection values() { + return values(AccessControlRulesMode.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesPrivilege.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesPrivilege.java new file mode 100644 index 0000000000000..8a85e531cd8e6 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesPrivilege.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The properties of an Access Control Rule Privilege. + */ +@Fluent +public final class AccessControlRulesPrivilege implements JsonSerializable { + /* + * The name of the privilege. + */ + private String name; + + /* + * The HTTP path corresponding to the privilege. + */ + private String path; + + /* + * The query parameters to match in the path. + */ + private Map queryParameters; + + /** + * Creates an instance of AccessControlRulesPrivilege class. + */ + public AccessControlRulesPrivilege() { + } + + /** + * Get the name property: The name of the privilege. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the privilege. + * + * @param name the name value to set. + * @return the AccessControlRulesPrivilege object itself. + */ + public AccessControlRulesPrivilege withName(String name) { + this.name = name; + return this; + } + + /** + * Get the path property: The HTTP path corresponding to the privilege. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: The HTTP path corresponding to the privilege. + * + * @param path the path value to set. + * @return the AccessControlRulesPrivilege object itself. + */ + public AccessControlRulesPrivilege withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the queryParameters property: The query parameters to match in the path. + * + * @return the queryParameters value. + */ + public Map queryParameters() { + return this.queryParameters; + } + + /** + * Set the queryParameters property: The query parameters to match in the path. + * + * @param queryParameters the queryParameters value to set. + * @return the AccessControlRulesPrivilege object itself. + */ + public AccessControlRulesPrivilege withQueryParameters(Map queryParameters) { + this.queryParameters = queryParameters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model AccessControlRulesPrivilege")); + } + if (path() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property path in model AccessControlRulesPrivilege")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AccessControlRulesPrivilege.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("path", this.path); + jsonWriter.writeMapField("queryParameters", this.queryParameters, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlRulesPrivilege from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlRulesPrivilege if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AccessControlRulesPrivilege. + */ + public static AccessControlRulesPrivilege fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlRulesPrivilege deserializedAccessControlRulesPrivilege = new AccessControlRulesPrivilege(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedAccessControlRulesPrivilege.name = reader.getString(); + } else if ("path".equals(fieldName)) { + deserializedAccessControlRulesPrivilege.path = reader.getString(); + } else if ("queryParameters".equals(fieldName)) { + Map queryParameters = reader.readMap(reader1 -> reader1.getString()); + deserializedAccessControlRulesPrivilege.queryParameters = queryParameters; + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlRulesPrivilege; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesRole.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesRole.java new file mode 100644 index 0000000000000..9410a3ae7153a --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesRole.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The properties of an Access Control Rule Role. + */ +@Fluent +public final class AccessControlRulesRole implements JsonSerializable { + /* + * The name of the role. + */ + private String name; + + /* + * A list of privileges needed by this role. + */ + private List privileges; + + /** + * Creates an instance of AccessControlRulesRole class. + */ + public AccessControlRulesRole() { + } + + /** + * Get the name property: The name of the role. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the role. + * + * @param name the name value to set. + * @return the AccessControlRulesRole object itself. + */ + public AccessControlRulesRole withName(String name) { + this.name = name; + return this; + } + + /** + * Get the privileges property: A list of privileges needed by this role. + * + * @return the privileges value. + */ + public List privileges() { + return this.privileges; + } + + /** + * Set the privileges property: A list of privileges needed by this role. + * + * @param privileges the privileges value to set. + * @return the AccessControlRulesRole object itself. + */ + public AccessControlRulesRole withPrivileges(List privileges) { + this.privileges = privileges; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model AccessControlRulesRole")); + } + if (privileges() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property privileges in model AccessControlRulesRole")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AccessControlRulesRole.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("privileges", this.privileges, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlRulesRole from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlRulesRole if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AccessControlRulesRole. + */ + public static AccessControlRulesRole fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlRulesRole deserializedAccessControlRulesRole = new AccessControlRulesRole(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedAccessControlRulesRole.name = reader.getString(); + } else if ("privileges".equals(fieldName)) { + List privileges = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlRulesRole.privileges = privileges; + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlRulesRole; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesRoleAssignment.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesRoleAssignment.java new file mode 100644 index 0000000000000..f023d72e141a6 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesRoleAssignment.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The properties of an Access Control Rule RoleAssignment. + */ +@Fluent +public final class AccessControlRulesRoleAssignment implements JsonSerializable { + /* + * The name of the role. + */ + private String role; + + /* + * A list of identities that can access the privileges defined by the role. + */ + private List identities; + + /** + * Creates an instance of AccessControlRulesRoleAssignment class. + */ + public AccessControlRulesRoleAssignment() { + } + + /** + * Get the role property: The name of the role. + * + * @return the role value. + */ + public String role() { + return this.role; + } + + /** + * Set the role property: The name of the role. + * + * @param role the role value to set. + * @return the AccessControlRulesRoleAssignment object itself. + */ + public AccessControlRulesRoleAssignment withRole(String role) { + this.role = role; + return this; + } + + /** + * Get the identities property: A list of identities that can access the privileges defined by the role. + * + * @return the identities value. + */ + public List identities() { + return this.identities; + } + + /** + * Set the identities property: A list of identities that can access the privileges defined by the role. + * + * @param identities the identities value to set. + * @return the AccessControlRulesRoleAssignment object itself. + */ + public AccessControlRulesRoleAssignment withIdentities(List identities) { + this.identities = identities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (role() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property role in model AccessControlRulesRoleAssignment")); + } + if (identities() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property identities in model AccessControlRulesRoleAssignment")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AccessControlRulesRoleAssignment.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("role", this.role); + jsonWriter.writeArrayField("identities", this.identities, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlRulesRoleAssignment from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlRulesRoleAssignment if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AccessControlRulesRoleAssignment. + */ + public static AccessControlRulesRoleAssignment fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlRulesRoleAssignment deserializedAccessControlRulesRoleAssignment + = new AccessControlRulesRoleAssignment(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("role".equals(fieldName)) { + deserializedAccessControlRulesRoleAssignment.role = reader.getString(); + } else if ("identities".equals(fieldName)) { + List identities = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlRulesRoleAssignment.identities = identities; + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlRulesRoleAssignment; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AdditionalReplicaSet.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AdditionalReplicaSet.java new file mode 100644 index 0000000000000..f49f5ab06a2cf --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AdditionalReplicaSet.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the additional replica set information. + */ +@Fluent +public final class AdditionalReplicaSet implements JsonSerializable { + /* + * Specifies the storage account type to be used to create the direct drive replicas + */ + private StorageAccountType storageAccountType; + + /* + * The number of direct drive replicas of the Image Version to be created.This Property is updatable + */ + private Integer regionalReplicaCount; + + /** + * Creates an instance of AdditionalReplicaSet class. + */ + public AdditionalReplicaSet() { + } + + /** + * Get the storageAccountType property: Specifies the storage account type to be used to create the direct drive + * replicas. + * + * @return the storageAccountType value. + */ + public StorageAccountType storageAccountType() { + return this.storageAccountType; + } + + /** + * Set the storageAccountType property: Specifies the storage account type to be used to create the direct drive + * replicas. + * + * @param storageAccountType the storageAccountType value to set. + * @return the AdditionalReplicaSet object itself. + */ + public AdditionalReplicaSet withStorageAccountType(StorageAccountType storageAccountType) { + this.storageAccountType = storageAccountType; + return this; + } + + /** + * Get the regionalReplicaCount property: The number of direct drive replicas of the Image Version to be + * created.This Property is updatable. + * + * @return the regionalReplicaCount value. + */ + public Integer regionalReplicaCount() { + return this.regionalReplicaCount; + } + + /** + * Set the regionalReplicaCount property: The number of direct drive replicas of the Image Version to be + * created.This Property is updatable. + * + * @param regionalReplicaCount the regionalReplicaCount value to set. + * @return the AdditionalReplicaSet object itself. + */ + public AdditionalReplicaSet withRegionalReplicaCount(Integer regionalReplicaCount) { + this.regionalReplicaCount = regionalReplicaCount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageAccountType", + this.storageAccountType == null ? null : this.storageAccountType.toString()); + jsonWriter.writeNumberField("regionalReplicaCount", this.regionalReplicaCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdditionalReplicaSet from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdditionalReplicaSet if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdditionalReplicaSet. + */ + public static AdditionalReplicaSet fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdditionalReplicaSet deserializedAdditionalReplicaSet = new AdditionalReplicaSet(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageAccountType".equals(fieldName)) { + deserializedAdditionalReplicaSet.storageAccountType + = StorageAccountType.fromString(reader.getString()); + } else if ("regionalReplicaCount".equals(fieldName)) { + deserializedAdditionalReplicaSet.regionalReplicaCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedAdditionalReplicaSet; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ApiError.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ApiError.java index 287efb4bf8117..75490ab0c514c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ApiError.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ApiError.java @@ -24,14 +24,14 @@ public final class ApiError extends ManagementError { private InnerError innererror; /* - * The error code parsed from the body of the http error response. + * Additional info for the error. */ - private String code; + private List additionalInfo; /* - * The error message parsed from the body of the http error response. + * Details for the error. */ - private String message; + private List details; /* * The target of the error. @@ -39,14 +39,14 @@ public final class ApiError extends ManagementError { private String target; /* - * Details for the error. + * The error message parsed from the body of the http error response. */ - private List details; + private String message; /* - * Additional info for the error. + * The error code parsed from the body of the http error response. */ - private List additionalInfo; + private String code; /** * Creates an instance of ApiError class. @@ -64,23 +64,23 @@ public InnerError getInnererror() { } /** - * Get the code property: The error code parsed from the body of the http error response. + * Get the additionalInfo property: Additional info for the error. * - * @return the code value. + * @return the additionalInfo value. */ @Override - public String getCode() { - return this.code; + public List getAdditionalInfo() { + return this.additionalInfo; } /** - * Get the message property: The error message parsed from the body of the http error response. + * Get the details property: Details for the error. * - * @return the message value. + * @return the details value. */ @Override - public String getMessage() { - return this.message; + public List getDetails() { + return this.details; } /** @@ -94,23 +94,23 @@ public String getTarget() { } /** - * Get the details property: Details for the error. + * Get the message property: The error message parsed from the body of the http error response. * - * @return the details value. + * @return the message value. */ @Override - public List getDetails() { - return this.details; + public String getMessage() { + return this.message; } /** - * Get the additionalInfo property: Additional info for the error. + * Get the code property: The error code parsed from the body of the http error response. * - * @return the additionalInfo value. + * @return the code value. */ @Override - public List getAdditionalInfo() { - return this.additionalInfo; + public String getCode() { + return this.code; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/Architecture.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/Architecture.java index 5c03d857b4be9..5f68423213669 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/Architecture.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/Architecture.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The architecture of the image. Applicable to OS disks only. + * CPU architecture supported by an OS disk. */ public final class Architecture extends ExpandableStringEnum { /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AvailabilitySetUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AvailabilitySetUpdate.java index e2b5c7d3a30fc..f7edd8868081e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AvailabilitySetUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/AvailabilitySetUpdate.java @@ -209,7 +209,6 @@ public AvailabilitySetUpdate withScheduledEventsPolicy(ScheduledEventsPolicy sch */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationGroupUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationGroupUpdate.java index 71266cb74dba2..eb5cfb009d92f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationGroupUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationGroupUpdate.java @@ -115,7 +115,6 @@ public CapacityReservationGroupUpdate withSharingProfile(ResourceSharingProfile */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationInstanceViewWithName.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationInstanceViewWithName.java index f249cc69db406..e2acbf9248655 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationInstanceViewWithName.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationInstanceViewWithName.java @@ -62,7 +62,12 @@ public CapacityReservationInstanceViewWithName withStatuses(List e.validate()); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationUpdate.java index a198a6404baec..fa4ac11ce829c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationUpdate.java @@ -158,7 +158,6 @@ public OffsetDateTime timeCreated() { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DataDisk.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DataDisk.java index 79880e66db7d2..2cf22a264ce27 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DataDisk.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DataDisk.java @@ -101,8 +101,7 @@ public final class DataDisk implements JsonSerializable { * managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected * failure from the virtual machine and the disk is still not released then use force-detach as a last resort option * to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. - * **This feature is still in preview**. To force-detach a data disk update toBeDetached to 'true' along with - * setting detachOption: 'ForceDetach'. + * To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. */ private DiskDetachOptionTypes detachOption; @@ -397,8 +396,8 @@ public Long diskMBpsReadWrite() { * **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did * not complete due to an unexpected failure from the virtual machine and the disk is still not released then use * force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been - * flushed when using this detach behavior. **This feature is still in preview**. To force-detach a data disk update - * toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + * flushed when using this detach behavior. To force-detach a data disk update toBeDetached to 'true' along with + * setting detachOption: 'ForceDetach'. * * @return the detachOption value. */ @@ -412,8 +411,8 @@ public DiskDetachOptionTypes detachOption() { * **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did * not complete due to an unexpected failure from the virtual machine and the disk is still not released then use * force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been - * flushed when using this detach behavior. **This feature is still in preview**. To force-detach a data disk update - * toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + * flushed when using this detach behavior. To force-detach a data disk update toBeDetached to 'true' along with + * setting detachOption: 'ForceDetach'. * * @param detachOption the detachOption value to set. * @return the DataDisk object itself. diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DataDiskImageEncryption.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DataDiskImageEncryption.java index 5c3ca7fa37377..a5e130f40b4b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DataDiskImageEncryption.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DataDiskImageEncryption.java @@ -67,7 +67,6 @@ public DataDiskImageEncryption withDiskEncryptionSetId(String diskEncryptionSetI */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostGroupUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostGroupUpdate.java index b2f829b056562..58a65ffa81691 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostGroupUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostGroupUpdate.java @@ -183,7 +183,6 @@ public DedicatedHostGroupPropertiesAdditionalCapabilities additionalCapabilities */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostInstanceViewWithName.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostInstanceViewWithName.java index e35faf477f5ba..dccadae7baa12 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostInstanceViewWithName.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostInstanceViewWithName.java @@ -78,7 +78,12 @@ public DedicatedHostInstanceViewWithName withStatuses(List s */ @Override public void validate() { - super.validate(); + if (availableCapacity() != null) { + availableCapacity().validate(); + } + if (statuses() != null) { + statuses().forEach(e -> e.validate()); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostUpdate.java index b178565841650..a26189b87cb8a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostUpdate.java @@ -217,7 +217,6 @@ public OffsetDateTime timeCreated() { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DiskDetachOptionTypes.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DiskDetachOptionTypes.java index a51633e5e13f9..23ec8c88f8de2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DiskDetachOptionTypes.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DiskDetachOptionTypes.java @@ -12,9 +12,8 @@ * the virtual machine. Supported values are: **ForceDetach.** detachOption: **ForceDetach** is applicable only for * managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure * from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach - * the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature - * is still in preview**. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: - * 'ForceDetach'. + * the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. To + * force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. */ public final class DiskDetachOptionTypes extends ExpandableStringEnum { /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DiskRestorePointAttributes.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DiskRestorePointAttributes.java index d363af7d46780..50f3a433e1d9d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DiskRestorePointAttributes.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/DiskRestorePointAttributes.java @@ -96,7 +96,6 @@ public String id() { */ @Override public void validate() { - super.validate(); if (encryption() != null) { encryption().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/EndpointAccess.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/EndpointAccess.java new file mode 100644 index 0000000000000..10457603da09d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/EndpointAccess.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * This property allows you to specify if the requests will be allowed to access the host endpoints. Possible values + * are: 'Allow', 'Deny'. + */ +public final class EndpointAccess extends ExpandableStringEnum { + /** + * Static value Allow for EndpointAccess. + */ + public static final EndpointAccess ALLOW = fromString("Allow"); + + /** + * Static value Deny for EndpointAccess. + */ + public static final EndpointAccess DENY = fromString("Deny"); + + /** + * Creates a new instance of EndpointAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EndpointAccess() { + } + + /** + * Creates or finds a EndpointAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding EndpointAccess. + */ + public static EndpointAccess fromString(String name) { + return fromString(name, EndpointAccess.class); + } + + /** + * Gets known EndpointAccess values. + * + * @return known EndpointAccess values. + */ + public static Collection values() { + return values(EndpointAccess.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/EndpointTypes.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/EndpointTypes.java new file mode 100644 index 0000000000000..ab651bbabbf0b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/EndpointTypes.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.compute.models; + +/** + * This property allows you to specify the Endpoint type for which this profile is defining the access control for. + * Possible values are: 'WireServer' or 'IMDS'. + */ +public enum EndpointTypes { + /** + * Enum value WireServer. + */ + WIRE_SERVER("WireServer"), + + /** + * Enum value IMDS. + */ + IMDS("IMDS"); + + /** + * The actual serialized value for a EndpointTypes instance. + */ + private final String value; + + EndpointTypes(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EndpointTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed EndpointTypes object, or null if unable to parse. + */ + public static EndpointTypes fromString(String value) { + if (value == null) { + return null; + } + EndpointTypes[] items = EndpointTypes.values(); + for (EndpointTypes item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ExecutedValidation.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ExecutedValidation.java new file mode 100644 index 0000000000000..6ce9bb3a1ae58 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ExecutedValidation.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * This is the executed Validation. + */ +@Fluent +public final class ExecutedValidation implements JsonSerializable { + /* + * This property specifies the type of image version validation. + */ + private String type; + + /* + * This property specifies the status of the validationProfile of the image version. + */ + private ValidationStatus status; + + /* + * This property specifies the valid version of the validation. + */ + private String version; + + /* + * This property specifies the starting timestamp. + */ + private OffsetDateTime executionTime; + + /** + * Creates an instance of ExecutedValidation class. + */ + public ExecutedValidation() { + } + + /** + * Get the type property: This property specifies the type of image version validation. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: This property specifies the type of image version validation. + * + * @param type the type value to set. + * @return the ExecutedValidation object itself. + */ + public ExecutedValidation withType(String type) { + this.type = type; + return this; + } + + /** + * Get the status property: This property specifies the status of the validationProfile of the image version. + * + * @return the status value. + */ + public ValidationStatus status() { + return this.status; + } + + /** + * Set the status property: This property specifies the status of the validationProfile of the image version. + * + * @param status the status value to set. + * @return the ExecutedValidation object itself. + */ + public ExecutedValidation withStatus(ValidationStatus status) { + this.status = status; + return this; + } + + /** + * Get the version property: This property specifies the valid version of the validation. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: This property specifies the valid version of the validation. + * + * @param version the version value to set. + * @return the ExecutedValidation object itself. + */ + public ExecutedValidation withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the executionTime property: This property specifies the starting timestamp. + * + * @return the executionTime value. + */ + public OffsetDateTime executionTime() { + return this.executionTime; + } + + /** + * Set the executionTime property: This property specifies the starting timestamp. + * + * @param executionTime the executionTime value to set. + * @return the ExecutedValidation object itself. + */ + public ExecutedValidation withExecutionTime(OffsetDateTime executionTime) { + this.executionTime = executionTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("executionTime", + this.executionTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.executionTime)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExecutedValidation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExecutedValidation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ExecutedValidation. + */ + public static ExecutedValidation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExecutedValidation deserializedExecutedValidation = new ExecutedValidation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedExecutedValidation.type = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedExecutedValidation.status = ValidationStatus.fromString(reader.getString()); + } else if ("version".equals(fieldName)) { + deserializedExecutedValidation.version = reader.getString(); + } else if ("executionTime".equals(fieldName)) { + deserializedExecutedValidation.executionTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedExecutedValidation; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationScriptRebootBehavior.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationScriptRebootBehavior.java new file mode 100644 index 0000000000000..5f0ee76dd1a3e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationScriptRebootBehavior.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.compute.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Optional. The action to be taken with regards to install/update/remove of the gallery application in the event of a + * reboot. + */ +public final class GalleryApplicationScriptRebootBehavior + extends ExpandableStringEnum { + /** + * Static value None for GalleryApplicationScriptRebootBehavior. + */ + public static final GalleryApplicationScriptRebootBehavior NONE = fromString("None"); + + /** + * Static value Rerun for GalleryApplicationScriptRebootBehavior. + */ + public static final GalleryApplicationScriptRebootBehavior RERUN = fromString("Rerun"); + + /** + * Creates a new instance of GalleryApplicationScriptRebootBehavior value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GalleryApplicationScriptRebootBehavior() { + } + + /** + * Creates or finds a GalleryApplicationScriptRebootBehavior from its string representation. + * + * @param name a name to look for. + * @return the corresponding GalleryApplicationScriptRebootBehavior. + */ + public static GalleryApplicationScriptRebootBehavior fromString(String name) { + return fromString(name, GalleryApplicationScriptRebootBehavior.class); + } + + /** + * Gets known GalleryApplicationScriptRebootBehavior values. + * + * @return known GalleryApplicationScriptRebootBehavior values. + */ + public static Collection values() { + return values(GalleryApplicationScriptRebootBehavior.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationUpdate.java index 680b8a2e9a977..276fca33059da 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationUpdate.java @@ -25,9 +25,9 @@ public final class GalleryApplicationUpdate extends UpdateResourceDefinition { private GalleryApplicationProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -35,9 +35,9 @@ public final class GalleryApplicationUpdate extends UpdateResourceDefinition { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of GalleryApplicationUpdate class. @@ -55,13 +55,13 @@ private GalleryApplicationProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -75,13 +75,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -269,7 +269,6 @@ public GalleryApplicationUpdate withCustomActions(List e.validate()); } + if (targetRegions() != null) { + targetRegions().forEach(e -> e.validate()); + } + if (targetExtendedLocations() != null) { + targetExtendedLocations().forEach(e -> e.validate()); + } } private static final ClientLogger LOGGER = new ClientLogger(GalleryApplicationVersionPublishingProfile.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionSafetyProfile.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionSafetyProfile.java index fe48c8f34ba6d..a3086f784b9ab 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionSafetyProfile.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionSafetyProfile.java @@ -38,7 +38,6 @@ public GalleryApplicationVersionSafetyProfile() { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionUpdate.java index ab2ac8e5a6da4..57ce02b3ed15e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionUpdate.java @@ -23,9 +23,9 @@ public final class GalleryApplicationVersionUpdate extends UpdateResourceDefinit private GalleryApplicationVersionProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -33,9 +33,9 @@ public final class GalleryApplicationVersionUpdate extends UpdateResourceDefinit private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of GalleryApplicationVersionUpdate class. @@ -53,13 +53,13 @@ private GalleryApplicationVersionProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -73,13 +73,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -163,7 +163,6 @@ public ReplicationStatus replicationStatus() { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryArtifactVersionFullSource.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryArtifactVersionFullSource.java index 78edca655ceb2..c0405da804fe5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryArtifactVersionFullSource.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryArtifactVersionFullSource.java @@ -93,7 +93,6 @@ public GalleryArtifactVersionFullSource withId(String id) { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryDataDiskImage.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryDataDiskImage.java index 46009f8fa3f2a..f6ac349ef8f01 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryDataDiskImage.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryDataDiskImage.java @@ -91,7 +91,9 @@ public GalleryDataDiskImage withSource(GalleryDiskImageSource source) { */ @Override public void validate() { - super.validate(); + if (source() != null) { + source().validate(); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryDiskImageSource.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryDiskImageSource.java index c64940360ebd2..253753138946e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryDiskImageSource.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryDiskImageSource.java @@ -89,7 +89,6 @@ public GalleryDiskImageSource withId(String id) { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryIdentity.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryIdentity.java new file mode 100644 index 0000000000000..a59cbb8628439 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryIdentity.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Identity for the virtual machine. + */ +@Fluent +public final class GalleryIdentity implements JsonSerializable { + /* + * The principal id of the gallery identity. This property will only be provided for a system assigned identity. + */ + private String principalId; + + /* + * The AAD tenant id of the gallery identity. This property will only be provided for a system assigned identity. + */ + private String tenantId; + + /* + * The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned' includes both an implicitly + * created identity and a set of user assigned identities. The type 'None' will remove all identities from the + * gallery. + */ + private ResourceIdentityType type; + + /* + * The list of user identities associated with the gallery. The user identity dictionary key references will be ARM + * resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}'. + */ + private Map userAssignedIdentities; + + /** + * Creates an instance of GalleryIdentity class. + */ + public GalleryIdentity() { + } + + /** + * Get the principalId property: The principal id of the gallery identity. This property will only be provided for a + * system assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The AAD tenant id of the gallery identity. This property will only be provided for a + * system assigned identity. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the type property: The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned' + * includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove + * all identities from the gallery. + * + * @return the type value. + */ + public ResourceIdentityType type() { + return this.type; + } + + /** + * Set the type property: The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned' + * includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove + * all identities from the gallery. + * + * @param type the type value to set. + * @return the GalleryIdentity object itself. + */ + public GalleryIdentity withType(ResourceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The list of user identities associated with the gallery. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The list of user identities associated with the gallery. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the GalleryIdentity object itself. + */ + public GalleryIdentity + withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (userAssignedIdentities() != null) { + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GalleryIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GalleryIdentity if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the GalleryIdentity. + */ + public static GalleryIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GalleryIdentity deserializedGalleryIdentity = new GalleryIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedGalleryIdentity.principalId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedGalleryIdentity.tenantId = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGalleryIdentity.type = ResourceIdentityType.fromString(reader.getString()); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> VirtualMachineIdentityUserAssignedIdentities.fromJson(reader1)); + deserializedGalleryIdentity.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedGalleryIdentity; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageFeature.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageFeature.java index 5887046d938a0..89ce49439e49a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageFeature.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageFeature.java @@ -26,6 +26,11 @@ public final class GalleryImageFeature implements JsonSerializable features) { } /** - * Get the architecture property: The architecture of the image. Applicable to OS disks only. + * Get the architecture property: CPU architecture supported by an OS disk. * * @return the architecture value. */ @@ -423,7 +423,7 @@ public Architecture architecture() { } /** - * Set the architecture property: The architecture of the image. Applicable to OS disks only. + * Set the architecture property: CPU architecture supported by an OS disk. * * @param architecture the architecture value to set. * @return the GalleryImageUpdate object itself. @@ -436,6 +436,29 @@ public GalleryImageUpdate withArchitecture(Architecture architecture) { return this; } + /** + * Get the allowUpdateImage property: Optional. Must be set to true if the gallery image features are being updated. + * + * @return the allowUpdateImage value. + */ + public Boolean allowUpdateImage() { + return this.innerProperties() == null ? null : this.innerProperties().allowUpdateImage(); + } + + /** + * Set the allowUpdateImage property: Optional. Must be set to true if the gallery image features are being updated. + * + * @param allowUpdateImage the allowUpdateImage value to set. + * @return the GalleryImageUpdate object itself. + */ + public GalleryImageUpdate withAllowUpdateImage(Boolean allowUpdateImage) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryImageProperties(); + } + this.innerProperties().withAllowUpdateImage(allowUpdateImage); + return this; + } + /** * Validates the instance. * @@ -443,7 +466,6 @@ public GalleryImageUpdate withArchitecture(Architecture architecture) { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionPublishingProfile.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionPublishingProfile.java index bfebdc7fa1815..0d6f32c5612dd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionPublishingProfile.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionPublishingProfile.java @@ -111,7 +111,12 @@ public GalleryImageVersionPublishingProfile withReplicationMode(ReplicationMode */ @Override public void validate() { - super.validate(); + if (targetRegions() != null) { + targetRegions().forEach(e -> e.validate()); + } + if (targetExtendedLocations() != null) { + targetExtendedLocations().forEach(e -> e.validate()); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionSafetyProfile.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionSafetyProfile.java index e5bd059b2091f..0373bded1b040 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionSafetyProfile.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionSafetyProfile.java @@ -26,6 +26,12 @@ public final class GalleryImageVersionSafetyProfile extends GalleryArtifactSafet */ private List policyViolations; + /* + * Indicates whether or not the deletion is blocked for this Gallery Image Version if its End Of Life has not + * expired. + */ + private Boolean blockDeletionBeforeEndOfLife; + /** * Creates an instance of GalleryImageVersionSafetyProfile class. */ @@ -52,6 +58,28 @@ public List policyViolations() { return this.policyViolations; } + /** + * Get the blockDeletionBeforeEndOfLife property: Indicates whether or not the deletion is blocked for this Gallery + * Image Version if its End Of Life has not expired. + * + * @return the blockDeletionBeforeEndOfLife value. + */ + public Boolean blockDeletionBeforeEndOfLife() { + return this.blockDeletionBeforeEndOfLife; + } + + /** + * Set the blockDeletionBeforeEndOfLife property: Indicates whether or not the deletion is blocked for this Gallery + * Image Version if its End Of Life has not expired. + * + * @param blockDeletionBeforeEndOfLife the blockDeletionBeforeEndOfLife value to set. + * @return the GalleryImageVersionSafetyProfile object itself. + */ + public GalleryImageVersionSafetyProfile withBlockDeletionBeforeEndOfLife(Boolean blockDeletionBeforeEndOfLife) { + this.blockDeletionBeforeEndOfLife = blockDeletionBeforeEndOfLife; + return this; + } + /** * {@inheritDoc} */ @@ -69,7 +97,6 @@ public List policyViolations() { */ @Override public void validate() { - super.validate(); if (policyViolations() != null) { policyViolations().forEach(e -> e.validate()); } @@ -82,6 +109,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeBooleanField("allowDeletionOfReplicatedLocations", allowDeletionOfReplicatedLocations()); + jsonWriter.writeBooleanField("blockDeletionBeforeEndOfLife", this.blockDeletionBeforeEndOfLife); return jsonWriter.writeEndObject(); } @@ -111,6 +139,9 @@ public static GalleryImageVersionSafetyProfile fromJson(JsonReader jsonReader) t List policyViolations = reader.readArray(reader1 -> PolicyViolation.fromJson(reader1)); deserializedGalleryImageVersionSafetyProfile.policyViolations = policyViolations; + } else if ("blockDeletionBeforeEndOfLife".equals(fieldName)) { + deserializedGalleryImageVersionSafetyProfile.blockDeletionBeforeEndOfLife + = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionUpdate.java index 62c11a5e2fcfa..4d9cfc72241b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionUpdate.java @@ -23,9 +23,9 @@ public final class GalleryImageVersionUpdate extends UpdateResourceDefinition { private GalleryImageVersionProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -33,9 +33,9 @@ public final class GalleryImageVersionUpdate extends UpdateResourceDefinition { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of GalleryImageVersionUpdate class. @@ -53,13 +53,13 @@ private GalleryImageVersionProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -73,13 +73,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -201,6 +201,38 @@ public GalleryImageVersionUpdate withSecurityProfile(ImageVersionSecurityProfile return this; } + /** + * Get the restore property: Indicates if this is a soft-delete resource restoration request. + * + * @return the restore value. + */ + public Boolean restore() { + return this.innerProperties() == null ? null : this.innerProperties().restore(); + } + + /** + * Set the restore property: Indicates if this is a soft-delete resource restoration request. + * + * @param restore the restore value to set. + * @return the GalleryImageVersionUpdate object itself. + */ + public GalleryImageVersionUpdate withRestore(Boolean restore) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryImageVersionProperties(); + } + this.innerProperties().withRestore(restore); + return this; + } + + /** + * Get the validationsProfile property: This is the validations profile of a Gallery Image Version. + * + * @return the validationsProfile value. + */ + public ValidationsProfile validationsProfile() { + return this.innerProperties() == null ? null : this.innerProperties().validationsProfile(); + } + /** * Validates the instance. * @@ -208,7 +240,6 @@ public GalleryImageVersionUpdate withSecurityProfile(ImageVersionSecurityProfile */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileList.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileList.java new file mode 100644 index 0000000000000..6c4080236ed90 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileList.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.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.compute.fluent.models.GalleryInVMAccessControlProfileInner; +import java.io.IOException; +import java.util.List; + +/** + * The List Gallery InVMAccessControlProfiles operation response. + */ +@Fluent +public final class GalleryInVMAccessControlProfileList + implements JsonSerializable { + /* + * A list of Gallery InVMAccessControlProfiles. + */ + private List value; + + /* + * The uri to fetch the next page of inVMAccessControlProfiles in the gallery. Call ListNext() with this to fetch + * the next page of gallery inVMAccessControlProfiles. + */ + private String nextLink; + + /** + * Creates an instance of GalleryInVMAccessControlProfileList class. + */ + public GalleryInVMAccessControlProfileList() { + } + + /** + * Get the value property: A list of Gallery InVMAccessControlProfiles. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of Gallery InVMAccessControlProfiles. + * + * @param value the value value to set. + * @return the GalleryInVMAccessControlProfileList object itself. + */ + public GalleryInVMAccessControlProfileList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The uri to fetch the next page of inVMAccessControlProfiles in the gallery. Call + * ListNext() with this to fetch the next page of gallery inVMAccessControlProfiles. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The uri to fetch the next page of inVMAccessControlProfiles in the gallery. Call + * ListNext() with this to fetch the next page of gallery inVMAccessControlProfiles. + * + * @param nextLink the nextLink value to set. + * @return the GalleryInVMAccessControlProfileList object itself. + */ + public GalleryInVMAccessControlProfileList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model GalleryInVMAccessControlProfileList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GalleryInVMAccessControlProfileList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GalleryInVMAccessControlProfileList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GalleryInVMAccessControlProfileList if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GalleryInVMAccessControlProfileList. + */ + public static GalleryInVMAccessControlProfileList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GalleryInVMAccessControlProfileList deserializedGalleryInVMAccessControlProfileList + = new GalleryInVMAccessControlProfileList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> GalleryInVMAccessControlProfileInner.fromJson(reader1)); + deserializedGalleryInVMAccessControlProfileList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGalleryInVMAccessControlProfileList; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileProperties.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileProperties.java new file mode 100644 index 0000000000000..ba3665f411acb --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileProperties.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.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the properties of a gallery inVMAccessControlProfile. + */ +@Fluent +public final class GalleryInVMAccessControlProfileProperties extends GalleryResourceProfilePropertiesBase { + /* + * The description of this gallery inVMAccessControlProfile resources. This property is updatable. + */ + private String description; + + /* + * This property allows you to specify the OS type of the VMs/VMSS for which this profile can be used against. + * Possible values are: 'Windows' or 'Linux' + */ + private OperatingSystemTypes osType; + + /* + * This property allows you to specify the Endpoint type for which this profile is defining the access control for. + * Possible values are: 'WireServer' or 'IMDS' + */ + private EndpointTypes applicableHostEndpoint; + + /* + * The provisioning state, which only appears in the response. + */ + private GalleryProvisioningState provisioningState; + + /** + * Creates an instance of GalleryInVMAccessControlProfileProperties class. + */ + public GalleryInVMAccessControlProfileProperties() { + } + + /** + * Get the description property: The description of this gallery inVMAccessControlProfile resources. This property + * is updatable. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of this gallery inVMAccessControlProfile resources. This property + * is updatable. + * + * @param description the description value to set. + * @return the GalleryInVMAccessControlProfileProperties object itself. + */ + public GalleryInVMAccessControlProfileProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the osType property: This property allows you to specify the OS type of the VMs/VMSS for which this profile + * can be used against. Possible values are: 'Windows' or 'Linux'. + * + * @return the osType value. + */ + public OperatingSystemTypes osType() { + return this.osType; + } + + /** + * Set the osType property: This property allows you to specify the OS type of the VMs/VMSS for which this profile + * can be used against. Possible values are: 'Windows' or 'Linux'. + * + * @param osType the osType value to set. + * @return the GalleryInVMAccessControlProfileProperties object itself. + */ + public GalleryInVMAccessControlProfileProperties withOsType(OperatingSystemTypes osType) { + this.osType = osType; + return this; + } + + /** + * Get the applicableHostEndpoint property: This property allows you to specify the Endpoint type for which this + * profile is defining the access control for. Possible values are: 'WireServer' or 'IMDS'. + * + * @return the applicableHostEndpoint value. + */ + public EndpointTypes applicableHostEndpoint() { + return this.applicableHostEndpoint; + } + + /** + * Set the applicableHostEndpoint property: This property allows you to specify the Endpoint type for which this + * profile is defining the access control for. Possible values are: 'WireServer' or 'IMDS'. + * + * @param applicableHostEndpoint the applicableHostEndpoint value to set. + * @return the GalleryInVMAccessControlProfileProperties object itself. + */ + public GalleryInVMAccessControlProfileProperties withApplicableHostEndpoint(EndpointTypes applicableHostEndpoint) { + this.applicableHostEndpoint = applicableHostEndpoint; + return this; + } + + /** + * Get the provisioningState property: The provisioning state, which only appears in the response. + * + * @return the provisioningState value. + */ + @Override + public GalleryProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (osType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property osType in model GalleryInVMAccessControlProfileProperties")); + } + if (applicableHostEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property applicableHostEndpoint in model GalleryInVMAccessControlProfileProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GalleryInVMAccessControlProfileProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); + jsonWriter.writeStringField("applicableHostEndpoint", + this.applicableHostEndpoint == null ? null : this.applicableHostEndpoint.toString()); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GalleryInVMAccessControlProfileProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GalleryInVMAccessControlProfileProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GalleryInVMAccessControlProfileProperties. + */ + public static GalleryInVMAccessControlProfileProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GalleryInVMAccessControlProfileProperties deserializedGalleryInVMAccessControlProfileProperties + = new GalleryInVMAccessControlProfileProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileProperties.provisioningState + = GalleryProvisioningState.fromString(reader.getString()); + } else if ("osType".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileProperties.osType + = OperatingSystemTypes.fromString(reader.getString()); + } else if ("applicableHostEndpoint".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileProperties.applicableHostEndpoint + = EndpointTypes.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileProperties.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGalleryInVMAccessControlProfileProperties; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileUpdate.java new file mode 100644 index 0000000000000..5d3e4c42381f9 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileUpdate.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Specifies information about the gallery inVMAccessControlProfile that you want to update. + */ +@Fluent +public final class GalleryInVMAccessControlProfileUpdate extends UpdateResourceDefinition { + /* + * Describes the properties of a gallery inVMAccessControlProfile. + */ + private GalleryInVMAccessControlProfileProperties properties; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of GalleryInVMAccessControlProfileUpdate class. + */ + public GalleryInVMAccessControlProfileUpdate() { + } + + /** + * Get the properties property: Describes the properties of a gallery inVMAccessControlProfile. + * + * @return the properties value. + */ + public GalleryInVMAccessControlProfileProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Describes the properties of a gallery inVMAccessControlProfile. + * + * @param properties the properties value to set. + * @return the GalleryInVMAccessControlProfileUpdate object itself. + */ + public GalleryInVMAccessControlProfileUpdate withProperties(GalleryInVMAccessControlProfileProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public GalleryInVMAccessControlProfileUpdate withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GalleryInVMAccessControlProfileUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GalleryInVMAccessControlProfileUpdate if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GalleryInVMAccessControlProfileUpdate. + */ + public static GalleryInVMAccessControlProfileUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GalleryInVMAccessControlProfileUpdate deserializedGalleryInVMAccessControlProfileUpdate + = new GalleryInVMAccessControlProfileUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileUpdate.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileUpdate.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileUpdate.type = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedGalleryInVMAccessControlProfileUpdate.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileUpdate.properties + = GalleryInVMAccessControlProfileProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGalleryInVMAccessControlProfileUpdate; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileVersionList.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileVersionList.java new file mode 100644 index 0000000000000..9862b282a6dbe --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileVersionList.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.compute.fluent.models.GalleryInVMAccessControlProfileVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * The List Gallery InVMAccessControlProfile Versions operation response. + */ +@Fluent +public final class GalleryInVMAccessControlProfileVersionList + implements JsonSerializable { + /* + * A list of Gallery InVMAccessControlProfile Versions. + */ + private List value; + + /* + * The uri to fetch the next page of inVMAccessControlProfile versions. Call ListNext() with this to fetch the next + * page of gallery inVMAccessControlProfile versions. + */ + private String nextLink; + + /** + * Creates an instance of GalleryInVMAccessControlProfileVersionList class. + */ + public GalleryInVMAccessControlProfileVersionList() { + } + + /** + * Get the value property: A list of Gallery InVMAccessControlProfile Versions. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of Gallery InVMAccessControlProfile Versions. + * + * @param value the value value to set. + * @return the GalleryInVMAccessControlProfileVersionList object itself. + */ + public GalleryInVMAccessControlProfileVersionList + withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The uri to fetch the next page of inVMAccessControlProfile versions. Call ListNext() + * with this to fetch the next page of gallery inVMAccessControlProfile versions. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The uri to fetch the next page of inVMAccessControlProfile versions. Call ListNext() + * with this to fetch the next page of gallery inVMAccessControlProfile versions. + * + * @param nextLink the nextLink value to set. + * @return the GalleryInVMAccessControlProfileVersionList object itself. + */ + public GalleryInVMAccessControlProfileVersionList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model GalleryInVMAccessControlProfileVersionList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GalleryInVMAccessControlProfileVersionList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GalleryInVMAccessControlProfileVersionList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GalleryInVMAccessControlProfileVersionList if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GalleryInVMAccessControlProfileVersionList. + */ + public static GalleryInVMAccessControlProfileVersionList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GalleryInVMAccessControlProfileVersionList deserializedGalleryInVMAccessControlProfileVersionList + = new GalleryInVMAccessControlProfileVersionList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> GalleryInVMAccessControlProfileVersionInner.fromJson(reader1)); + deserializedGalleryInVMAccessControlProfileVersionList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGalleryInVMAccessControlProfileVersionList; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileVersionUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileVersionUpdate.java new file mode 100644 index 0000000000000..1bb04f4722e55 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileVersionUpdate.java @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.compute.fluent.models.GalleryInVMAccessControlProfileVersionProperties; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** + * Specifies information about the gallery inVMAccessControlProfile version that you want to update. + */ +@Fluent +public final class GalleryInVMAccessControlProfileVersionUpdate extends UpdateResourceDefinition { + /* + * Describes the properties of an inVMAccessControlProfile version. + */ + private GalleryInVMAccessControlProfileVersionProperties innerProperties; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of GalleryInVMAccessControlProfileVersionUpdate class. + */ + public GalleryInVMAccessControlProfileVersionUpdate() { + } + + /** + * Get the innerProperties property: Describes the properties of an inVMAccessControlProfile version. + * + * @return the innerProperties value. + */ + private GalleryInVMAccessControlProfileVersionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public GalleryInVMAccessControlProfileVersionUpdate withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the mode property: This property allows you to specify whether the access control rules are in Audit mode, in + * Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + * + * @return the mode value. + */ + public AccessControlRulesMode mode() { + return this.innerProperties() == null ? null : this.innerProperties().mode(); + } + + /** + * Set the mode property: This property allows you to specify whether the access control rules are in Audit mode, in + * Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + * + * @param mode the mode value to set. + * @return the GalleryInVMAccessControlProfileVersionUpdate object itself. + */ + public GalleryInVMAccessControlProfileVersionUpdate withMode(AccessControlRulesMode mode) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryInVMAccessControlProfileVersionProperties(); + } + this.innerProperties().withMode(mode); + return this; + } + + /** + * Get the defaultAccess property: This property allows you to specify if the requests will be allowed to access the + * host endpoints. Possible values are: 'Allow', 'Deny'. + * + * @return the defaultAccess value. + */ + public EndpointAccess defaultAccess() { + return this.innerProperties() == null ? null : this.innerProperties().defaultAccess(); + } + + /** + * Set the defaultAccess property: This property allows you to specify if the requests will be allowed to access the + * host endpoints. Possible values are: 'Allow', 'Deny'. + * + * @param defaultAccess the defaultAccess value to set. + * @return the GalleryInVMAccessControlProfileVersionUpdate object itself. + */ + public GalleryInVMAccessControlProfileVersionUpdate withDefaultAccess(EndpointAccess defaultAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryInVMAccessControlProfileVersionProperties(); + } + this.innerProperties().withDefaultAccess(defaultAccess); + return this; + } + + /** + * Get the rules property: This is the Access Control Rules specification for an inVMAccessControlProfile version. + * + * @return the rules value. + */ + public AccessControlRules rules() { + return this.innerProperties() == null ? null : this.innerProperties().rules(); + } + + /** + * Set the rules property: This is the Access Control Rules specification for an inVMAccessControlProfile version. + * + * @param rules the rules value to set. + * @return the GalleryInVMAccessControlProfileVersionUpdate object itself. + */ + public GalleryInVMAccessControlProfileVersionUpdate withRules(AccessControlRules rules) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryInVMAccessControlProfileVersionProperties(); + } + this.innerProperties().withRules(rules); + return this; + } + + /** + * Get the targetLocations property: The target regions where the Resource Profile version is going to be replicated + * to. This property is updatable. + * + * @return the targetLocations value. + */ + public List targetLocations() { + return this.innerProperties() == null ? null : this.innerProperties().targetLocations(); + } + + /** + * Set the targetLocations property: The target regions where the Resource Profile version is going to be replicated + * to. This property is updatable. + * + * @param targetLocations the targetLocations value to set. + * @return the GalleryInVMAccessControlProfileVersionUpdate object itself. + */ + public GalleryInVMAccessControlProfileVersionUpdate withTargetLocations(List targetLocations) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryInVMAccessControlProfileVersionProperties(); + } + this.innerProperties().withTargetLocations(targetLocations); + return this; + } + + /** + * Get the excludeFromLatest property: If set to true, Virtual Machines deployed from the latest version of the + * Resource Profile won't use this Profile version. + * + * @return the excludeFromLatest value. + */ + public Boolean excludeFromLatest() { + return this.innerProperties() == null ? null : this.innerProperties().excludeFromLatest(); + } + + /** + * Set the excludeFromLatest property: If set to true, Virtual Machines deployed from the latest version of the + * Resource Profile won't use this Profile version. + * + * @param excludeFromLatest the excludeFromLatest value to set. + * @return the GalleryInVMAccessControlProfileVersionUpdate object itself. + */ + public GalleryInVMAccessControlProfileVersionUpdate withExcludeFromLatest(Boolean excludeFromLatest) { + if (this.innerProperties() == null) { + this.innerProperties = new GalleryInVMAccessControlProfileVersionProperties(); + } + this.innerProperties().withExcludeFromLatest(excludeFromLatest); + return this; + } + + /** + * Get the publishedDate property: The timestamp for when the Resource Profile Version is published. + * + * @return the publishedDate value. + */ + public OffsetDateTime publishedDate() { + return this.innerProperties() == null ? null : this.innerProperties().publishedDate(); + } + + /** + * Get the provisioningState property: The provisioning state, which only appears in the response. + * + * @return the provisioningState value. + */ + public GalleryProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the replicationStatus property: This is the replication status of the gallery image version. + * + * @return the replicationStatus value. + */ + public ReplicationStatus replicationStatus() { + return this.innerProperties() == null ? null : this.innerProperties().replicationStatus(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GalleryInVMAccessControlProfileVersionUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GalleryInVMAccessControlProfileVersionUpdate if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GalleryInVMAccessControlProfileVersionUpdate. + */ + public static GalleryInVMAccessControlProfileVersionUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GalleryInVMAccessControlProfileVersionUpdate deserializedGalleryInVMAccessControlProfileVersionUpdate + = new GalleryInVMAccessControlProfileVersionUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionUpdate.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionUpdate.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionUpdate.type = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedGalleryInVMAccessControlProfileVersionUpdate.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedGalleryInVMAccessControlProfileVersionUpdate.innerProperties + = GalleryInVMAccessControlProfileVersionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGalleryInVMAccessControlProfileVersionUpdate; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryList.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryList.java index 65ea52bc28d42..2839bd8ab1c31 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryList.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryList.java @@ -29,6 +29,11 @@ public final class GalleryList implements JsonSerializable { */ private String nextLink; + /* + * The security profile of a gallery image version + */ + private ImageVersionSecurityProfile securityProfile; + /** * Creates an instance of GalleryList class. */ @@ -77,6 +82,26 @@ public GalleryList withNextLink(String nextLink) { return this; } + /** + * Get the securityProfile property: The security profile of a gallery image version. + * + * @return the securityProfile value. + */ + public ImageVersionSecurityProfile securityProfile() { + return this.securityProfile; + } + + /** + * Set the securityProfile property: The security profile of a gallery image version. + * + * @param securityProfile the securityProfile value to set. + * @return the GalleryList object itself. + */ + public GalleryList withSecurityProfile(ImageVersionSecurityProfile securityProfile) { + this.securityProfile = securityProfile; + return this; + } + /** * Validates the instance. * @@ -89,6 +114,9 @@ public void validate() { } else { value().forEach(e -> e.validate()); } + if (securityProfile() != null) { + securityProfile().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(GalleryList.class); @@ -101,6 +129,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeJsonField("securityProfile", this.securityProfile); return jsonWriter.writeEndObject(); } @@ -125,6 +154,8 @@ public static GalleryList fromJson(JsonReader jsonReader) throws IOException { deserializedGalleryList.value = value; } else if ("nextLink".equals(fieldName)) { deserializedGalleryList.nextLink = reader.getString(); + } else if ("securityProfile".equals(fieldName)) { + deserializedGalleryList.securityProfile = ImageVersionSecurityProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryOSDiskImage.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryOSDiskImage.java index db34894449510..15bedb29474be 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryOSDiskImage.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryOSDiskImage.java @@ -61,7 +61,9 @@ public GalleryOSDiskImage withSource(GalleryDiskImageSource source) { */ @Override public void validate() { - super.validate(); + if (source() != null) { + source().validate(); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryResourceProfilePropertiesBase.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryResourceProfilePropertiesBase.java new file mode 100644 index 0000000000000..c3c062fd4f886 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryResourceProfilePropertiesBase.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties of a gallery ResourceProfile. + */ +@Immutable +public class GalleryResourceProfilePropertiesBase implements JsonSerializable { + /* + * The provisioning state, which only appears in the response. + */ + private GalleryProvisioningState provisioningState; + + /** + * Creates an instance of GalleryResourceProfilePropertiesBase class. + */ + public GalleryResourceProfilePropertiesBase() { + } + + /** + * Get the provisioningState property: The provisioning state, which only appears in the response. + * + * @return the provisioningState value. + */ + public GalleryProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The provisioning state, which only appears in the response. + * + * @param provisioningState the provisioningState value to set. + * @return the GalleryResourceProfilePropertiesBase object itself. + */ + GalleryResourceProfilePropertiesBase withProvisioningState(GalleryProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GalleryResourceProfilePropertiesBase from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GalleryResourceProfilePropertiesBase if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GalleryResourceProfilePropertiesBase. + */ + public static GalleryResourceProfilePropertiesBase fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GalleryResourceProfilePropertiesBase deserializedGalleryResourceProfilePropertiesBase + = new GalleryResourceProfilePropertiesBase(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedGalleryResourceProfilePropertiesBase.provisioningState + = GalleryProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedGalleryResourceProfilePropertiesBase; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryResourceProfileVersionPropertiesBase.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryResourceProfileVersionPropertiesBase.java new file mode 100644 index 0000000000000..18b6282e76375 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryResourceProfileVersionPropertiesBase.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The properties of a gallery ResourceProfile version. + */ +@Fluent +public class GalleryResourceProfileVersionPropertiesBase + implements JsonSerializable { + /* + * The target regions where the Resource Profile version is going to be replicated to. This property is updatable. + */ + private List targetLocations; + + /* + * If set to true, Virtual Machines deployed from the latest version of the Resource Profile won't use this Profile + * version. + */ + private Boolean excludeFromLatest; + + /* + * The timestamp for when the Resource Profile Version is published. + */ + private OffsetDateTime publishedDate; + + /* + * The provisioning state, which only appears in the response. + */ + private GalleryProvisioningState provisioningState; + + /* + * This is the replication status of the gallery image version. + */ + private ReplicationStatus replicationStatus; + + /** + * Creates an instance of GalleryResourceProfileVersionPropertiesBase class. + */ + public GalleryResourceProfileVersionPropertiesBase() { + } + + /** + * Get the targetLocations property: The target regions where the Resource Profile version is going to be replicated + * to. This property is updatable. + * + * @return the targetLocations value. + */ + public List targetLocations() { + return this.targetLocations; + } + + /** + * Set the targetLocations property: The target regions where the Resource Profile version is going to be replicated + * to. This property is updatable. + * + * @param targetLocations the targetLocations value to set. + * @return the GalleryResourceProfileVersionPropertiesBase object itself. + */ + public GalleryResourceProfileVersionPropertiesBase withTargetLocations(List targetLocations) { + this.targetLocations = targetLocations; + return this; + } + + /** + * Get the excludeFromLatest property: If set to true, Virtual Machines deployed from the latest version of the + * Resource Profile won't use this Profile version. + * + * @return the excludeFromLatest value. + */ + public Boolean excludeFromLatest() { + return this.excludeFromLatest; + } + + /** + * Set the excludeFromLatest property: If set to true, Virtual Machines deployed from the latest version of the + * Resource Profile won't use this Profile version. + * + * @param excludeFromLatest the excludeFromLatest value to set. + * @return the GalleryResourceProfileVersionPropertiesBase object itself. + */ + public GalleryResourceProfileVersionPropertiesBase withExcludeFromLatest(Boolean excludeFromLatest) { + this.excludeFromLatest = excludeFromLatest; + return this; + } + + /** + * Get the publishedDate property: The timestamp for when the Resource Profile Version is published. + * + * @return the publishedDate value. + */ + public OffsetDateTime publishedDate() { + return this.publishedDate; + } + + /** + * Set the publishedDate property: The timestamp for when the Resource Profile Version is published. + * + * @param publishedDate the publishedDate value to set. + * @return the GalleryResourceProfileVersionPropertiesBase object itself. + */ + GalleryResourceProfileVersionPropertiesBase withPublishedDate(OffsetDateTime publishedDate) { + this.publishedDate = publishedDate; + return this; + } + + /** + * Get the provisioningState property: The provisioning state, which only appears in the response. + * + * @return the provisioningState value. + */ + public GalleryProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The provisioning state, which only appears in the response. + * + * @param provisioningState the provisioningState value to set. + * @return the GalleryResourceProfileVersionPropertiesBase object itself. + */ + GalleryResourceProfileVersionPropertiesBase withProvisioningState(GalleryProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the replicationStatus property: This is the replication status of the gallery image version. + * + * @return the replicationStatus value. + */ + public ReplicationStatus replicationStatus() { + return this.replicationStatus; + } + + /** + * Set the replicationStatus property: This is the replication status of the gallery image version. + * + * @param replicationStatus the replicationStatus value to set. + * @return the GalleryResourceProfileVersionPropertiesBase object itself. + */ + GalleryResourceProfileVersionPropertiesBase withReplicationStatus(ReplicationStatus replicationStatus) { + this.replicationStatus = replicationStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (targetLocations() != null) { + targetLocations().forEach(e -> e.validate()); + } + if (replicationStatus() != null) { + replicationStatus().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("targetLocations", this.targetLocations, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("excludeFromLatest", this.excludeFromLatest); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GalleryResourceProfileVersionPropertiesBase from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GalleryResourceProfileVersionPropertiesBase if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GalleryResourceProfileVersionPropertiesBase. + */ + public static GalleryResourceProfileVersionPropertiesBase fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GalleryResourceProfileVersionPropertiesBase deserializedGalleryResourceProfileVersionPropertiesBase + = new GalleryResourceProfileVersionPropertiesBase(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetLocations".equals(fieldName)) { + List targetLocations = reader.readArray(reader1 -> TargetRegion.fromJson(reader1)); + deserializedGalleryResourceProfileVersionPropertiesBase.targetLocations = targetLocations; + } else if ("excludeFromLatest".equals(fieldName)) { + deserializedGalleryResourceProfileVersionPropertiesBase.excludeFromLatest + = reader.getNullable(JsonReader::getBoolean); + } else if ("publishedDate".equals(fieldName)) { + deserializedGalleryResourceProfileVersionPropertiesBase.publishedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedGalleryResourceProfileVersionPropertiesBase.provisioningState + = GalleryProvisioningState.fromString(reader.getString()); + } else if ("replicationStatus".equals(fieldName)) { + deserializedGalleryResourceProfileVersionPropertiesBase.replicationStatus + = ReplicationStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGalleryResourceProfileVersionPropertiesBase; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GallerySoftDeletedResourceList.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GallerySoftDeletedResourceList.java new file mode 100644 index 0000000000000..7988347cb73f5 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GallerySoftDeletedResourceList.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.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.compute.fluent.models.GallerySoftDeletedResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The List Soft-deleted Resources operation response. + */ +@Fluent +public final class GallerySoftDeletedResourceList implements JsonSerializable { + /* + * A list of soft-deleted resources. + */ + private List value; + + /* + * The uri to fetch the next page of soft-deleted resources. Call ListNext() with this to fetch the next page of + * soft-deleted resources. + */ + private String nextLink; + + /** + * Creates an instance of GallerySoftDeletedResourceList class. + */ + public GallerySoftDeletedResourceList() { + } + + /** + * Get the value property: A list of soft-deleted resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of soft-deleted resources. + * + * @param value the value value to set. + * @return the GallerySoftDeletedResourceList object itself. + */ + public GallerySoftDeletedResourceList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The uri to fetch the next page of soft-deleted resources. Call ListNext() with this to + * fetch the next page of soft-deleted resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The uri to fetch the next page of soft-deleted resources. Call ListNext() with this to + * fetch the next page of soft-deleted resources. + * + * @param nextLink the nextLink value to set. + * @return the GallerySoftDeletedResourceList object itself. + */ + public GallerySoftDeletedResourceList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model GallerySoftDeletedResourceList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GallerySoftDeletedResourceList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GallerySoftDeletedResourceList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GallerySoftDeletedResourceList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GallerySoftDeletedResourceList. + */ + public static GallerySoftDeletedResourceList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GallerySoftDeletedResourceList deserializedGallerySoftDeletedResourceList + = new GallerySoftDeletedResourceList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> GallerySoftDeletedResourceInner.fromJson(reader1)); + deserializedGallerySoftDeletedResourceList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedGallerySoftDeletedResourceList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGallerySoftDeletedResourceList; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryUpdate.java index aa288963ce192..506b31bc8a6c8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/GalleryUpdate.java @@ -23,9 +23,14 @@ public final class GalleryUpdate extends UpdateResourceDefinition { private GalleryProperties innerProperties; /* - * Fully qualified resource Id for the resource. + * The identity of the gallery, if configured. */ - private String id; + private GalleryIdentity identity; + + /* + * The type of the resource. + */ + private String type; /* * The name of the resource. @@ -33,9 +38,9 @@ public final class GalleryUpdate extends UpdateResourceDefinition { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of GalleryUpdate class. @@ -53,13 +58,33 @@ private GalleryProperties innerProperties() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the identity property: The identity of the gallery, if configured. * - * @return the id value. + * @return the identity value. + */ + public GalleryIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the gallery, if configured. + * + * @param identity the identity value to set. + * @return the GalleryUpdate object itself. + */ + public GalleryUpdate withIdentity(GalleryIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -73,13 +98,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -208,10 +233,12 @@ public SharingStatus sharingStatus() { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } + if (identity() != null) { + identity().validate(); + } } /** @@ -222,6 +249,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -252,6 +280,8 @@ public static GalleryUpdate fromJson(JsonReader jsonReader) throws IOException { deserializedGalleryUpdate.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedGalleryUpdate.innerProperties = GalleryProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedGalleryUpdate.identity = GalleryIdentity.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ImageDataDisk.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ImageDataDisk.java index 62262c4e6ef7a..6f111c7a5e833 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ImageDataDisk.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ImageDataDisk.java @@ -120,7 +120,9 @@ public ImageDataDisk withDiskEncryptionSet(DiskEncryptionSetParameters diskEncry */ @Override public void validate() { - super.validate(); + if (diskEncryptionSet() != null) { + diskEncryptionSet().validate(); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ImageOSDisk.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ImageOSDisk.java index a499434db2d5d..bbe6d6298d24f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ImageOSDisk.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ImageOSDisk.java @@ -146,7 +146,6 @@ public ImageOSDisk withDiskEncryptionSet(DiskEncryptionSetParameters diskEncrypt */ @Override public void validate() { - super.validate(); if (osType() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property osType in model ImageOSDisk")); @@ -155,6 +154,9 @@ public void validate() { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property osState in model ImageOSDisk")); } + if (diskEncryptionSet() != null) { + diskEncryptionSet().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(ImageOSDisk.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ImageUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ImageUpdate.java index 496b1304941f8..7ad846b158c80 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ImageUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ImageUpdate.java @@ -138,7 +138,6 @@ public ImageUpdate withHyperVGeneration(HyperVGenerationTypes hyperVGeneration) */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/OSDiskImageEncryption.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/OSDiskImageEncryption.java index 10a40ca7a4f43..779b91c750b3c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/OSDiskImageEncryption.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/OSDiskImageEncryption.java @@ -62,7 +62,6 @@ public OSDiskImageEncryption withDiskEncryptionSetId(String diskEncryptionSetId) */ @Override public void validate() { - super.validate(); if (securityProfile() != null) { securityProfile().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/OperatingSystemTypes.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/OperatingSystemTypes.java index ed1d058e4325f..597e32585d197 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/OperatingSystemTypes.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/OperatingSystemTypes.java @@ -5,8 +5,7 @@ package com.azure.resourcemanager.compute.models; /** - * This property allows you to specify the supported type of the OS that application is built for. Possible values are: - * **Windows,** **Linux.**. + * The Operating System type. */ public enum OperatingSystemTypes { /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/PirSharedGalleryResource.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/PirSharedGalleryResource.java index 723cb544e09fa..522474cac5015 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/PirSharedGalleryResource.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/PirSharedGalleryResource.java @@ -22,14 +22,14 @@ public class PirSharedGalleryResource extends PirResource { private SharedGalleryIdentifier innerIdentifier; /* - * Resource name + * Resource location */ - private String name; + private String location; /* - * Resource location + * Resource name */ - private String location; + private String name; /** * Creates an instance of PirSharedGalleryResource class. @@ -58,23 +58,23 @@ PirSharedGalleryResource withInnerIdentifier(SharedGalleryIdentifier innerIdenti } /** - * Get the name property: Resource name. + * Get the location property: Resource location. * - * @return the name value. + * @return the location value. */ @Override - public String name() { - return this.name; + public String location() { + return this.location; } /** - * Get the location property: Resource location. + * Get the name property: Resource name. * - * @return the location value. + * @return the name value. */ @Override - public String location() { - return this.location; + public String name() { + return this.name; } /** @@ -107,7 +107,6 @@ public PirSharedGalleryResource withUniqueId(String uniqueId) { */ @Override public void validate() { - super.validate(); if (innerIdentifier() != null) { innerIdentifier().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/PlatformAttribute.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/PlatformAttribute.java new file mode 100644 index 0000000000000..92cc676ed5a7c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/PlatformAttribute.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * This is the platform attribute of the image version. + */ +@Immutable +public final class PlatformAttribute implements JsonSerializable { + /* + * This property specifies the name of the platformAttribute. It is read-only. + */ + private String name; + + /* + * This property specifies the value of the corresponding name property. It is read-only. + */ + private String value; + + /** + * Creates an instance of PlatformAttribute class. + */ + public PlatformAttribute() { + } + + /** + * Get the name property: This property specifies the name of the platformAttribute. It is read-only. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the value property: This property specifies the value of the corresponding name property. It is read-only. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlatformAttribute from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlatformAttribute if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PlatformAttribute. + */ + public static PlatformAttribute fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlatformAttribute deserializedPlatformAttribute = new PlatformAttribute(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedPlatformAttribute.name = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedPlatformAttribute.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformAttribute; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ProximityPlacementGroupUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ProximityPlacementGroupUpdate.java index 3e8c138a26f74..db888a0cbbaca 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ProximityPlacementGroupUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ProximityPlacementGroupUpdate.java @@ -38,7 +38,6 @@ public ProximityPlacementGroupUpdate withTags(Map tags) { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/RequestRateByIntervalInput.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/RequestRateByIntervalInput.java index 251f1257154e1..1a26fcba0e15e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/RequestRateByIntervalInput.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/RequestRateByIntervalInput.java @@ -129,12 +129,26 @@ public RequestRateByIntervalInput withGroupByUserAgent(Boolean groupByUserAgent) */ @Override public void validate() { - super.validate(); if (intervalLength() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Missing required property intervalLength in model RequestRateByIntervalInput")); } + if (blobContainerSasUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property blobContainerSasUri in model RequestRateByIntervalInput")); + } + if (fromTime() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property fromTime in model RequestRateByIntervalInput")); + } + if (toTime() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property toTime in model RequestRateByIntervalInput")); + } } private static final ClientLogger LOGGER = new ClientLogger(RequestRateByIntervalInput.class); diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ResourceIdentityType.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ResourceIdentityType.java index 5f100835bab41..1db2a98f1bb37 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ResourceIdentityType.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ResourceIdentityType.java @@ -5,9 +5,8 @@ package com.azure.resourcemanager.compute.models; /** - * The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an - * implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from - * the virtual machine scale set. + * The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned' includes both an implicitly + * created identity and a set of user assigned identities. The type 'None' will remove all identities from the gallery. */ public enum ResourceIdentityType { /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ResourceWithOptionalLocation.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ResourceWithOptionalLocation.java index f05451eca3d52..c7d17bc923ccf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ResourceWithOptionalLocation.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ResourceWithOptionalLocation.java @@ -18,9 +18,9 @@ @Fluent public class ResourceWithOptionalLocation extends Resource { /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -28,9 +28,9 @@ public class ResourceWithOptionalLocation extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ResourceWithOptionalLocation class. @@ -39,13 +39,13 @@ public ResourceWithOptionalLocation() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -59,13 +59,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/RestorePointCollectionUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/RestorePointCollectionUpdate.java index 9f913d3e87cf4..9105991e6705e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/RestorePointCollectionUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/RestorePointCollectionUpdate.java @@ -107,7 +107,6 @@ public List restorePoints() { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryDataDiskImage.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryDataDiskImage.java index b87c2e93818df..2b0530e621e3c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryDataDiskImage.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryDataDiskImage.java @@ -82,7 +82,6 @@ public SharedGalleryDataDiskImage withHostCaching(SharedGalleryHostCaching hostC */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryOSDiskImage.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryOSDiskImage.java index 04120e305eb8c..1c5cdb63be37f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryOSDiskImage.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryOSDiskImage.java @@ -52,7 +52,6 @@ public SharedGalleryOSDiskImage withHostCaching(SharedGalleryHostCaching hostCac */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SoftDeletedArtifactTypes.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SoftDeletedArtifactTypes.java new file mode 100644 index 0000000000000..8aed14c4a8f65 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SoftDeletedArtifactTypes.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * artifact type of the soft-deleted resource. + */ +public final class SoftDeletedArtifactTypes extends ExpandableStringEnum { + /** + * Static value Images for SoftDeletedArtifactTypes. + */ + public static final SoftDeletedArtifactTypes IMAGES = fromString("Images"); + + /** + * Creates a new instance of SoftDeletedArtifactTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SoftDeletedArtifactTypes() { + } + + /** + * Creates or finds a SoftDeletedArtifactTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding SoftDeletedArtifactTypes. + */ + public static SoftDeletedArtifactTypes fromString(String name) { + return fromString(name, SoftDeletedArtifactTypes.class); + } + + /** + * Gets known SoftDeletedArtifactTypes values. + * + * @return known SoftDeletedArtifactTypes values. + */ + public static Collection values() { + return values(SoftDeletedArtifactTypes.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SshPublicKeyUpdateResource.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SshPublicKeyUpdateResource.java index e43326ab3c2f9..1041433ffa6c0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SshPublicKeyUpdateResource.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/SshPublicKeyUpdateResource.java @@ -82,7 +82,6 @@ public SshPublicKeyUpdateResource withPublicKey(String publicKey) { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/StorageAccountType.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/StorageAccountType.java index 44b5cb3035b3b..a96baac2da17f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/StorageAccountType.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/StorageAccountType.java @@ -26,6 +26,11 @@ public final class StorageAccountType extends ExpandableStringEnum { */ private Boolean excludeFromLatest; + /* + * List of storage sku with replica count to create direct drive replicas. + */ + private List additionalReplicaSets; + /** * Creates an instance of TargetRegion class. */ @@ -157,6 +163,26 @@ public TargetRegion withExcludeFromLatest(Boolean excludeFromLatest) { return this; } + /** + * Get the additionalReplicaSets property: List of storage sku with replica count to create direct drive replicas. + * + * @return the additionalReplicaSets value. + */ + public List additionalReplicaSets() { + return this.additionalReplicaSets; + } + + /** + * Set the additionalReplicaSets property: List of storage sku with replica count to create direct drive replicas. + * + * @param additionalReplicaSets the additionalReplicaSets value to set. + * @return the TargetRegion object itself. + */ + public TargetRegion withAdditionalReplicaSets(List additionalReplicaSets) { + this.additionalReplicaSets = additionalReplicaSets; + return this; + } + /** * Validates the instance. * @@ -170,6 +196,9 @@ public void validate() { if (encryption() != null) { encryption().validate(); } + if (additionalReplicaSets() != null) { + additionalReplicaSets().forEach(e -> e.validate()); + } } private static final ClientLogger LOGGER = new ClientLogger(TargetRegion.class); @@ -186,6 +215,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { this.storageAccountType == null ? null : this.storageAccountType.toString()); jsonWriter.writeJsonField("encryption", this.encryption); jsonWriter.writeBooleanField("excludeFromLatest", this.excludeFromLatest); + jsonWriter.writeArrayField("additionalReplicaSets", this.additionalReplicaSets, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -215,6 +246,10 @@ public static TargetRegion fromJson(JsonReader jsonReader) throws IOException { deserializedTargetRegion.encryption = EncryptionImages.fromJson(reader); } else if ("excludeFromLatest".equals(fieldName)) { deserializedTargetRegion.excludeFromLatest = reader.getNullable(JsonReader::getBoolean); + } else if ("additionalReplicaSets".equals(fieldName)) { + List additionalReplicaSets + = reader.readArray(reader1 -> AdditionalReplicaSet.fromJson(reader1)); + deserializedTargetRegion.additionalReplicaSets = additionalReplicaSets; } else { reader.skipChildren(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ThrottledRequestsInput.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ThrottledRequestsInput.java index 9e2214b9d66af..4b64201de54f6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ThrottledRequestsInput.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ThrottledRequestsInput.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -103,9 +104,24 @@ public ThrottledRequestsInput withGroupByUserAgent(Boolean groupByUserAgent) { */ @Override public void validate() { - super.validate(); + if (blobContainerSasUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property blobContainerSasUri in model ThrottledRequestsInput")); + } + if (fromTime() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property fromTime in model ThrottledRequestsInput")); + } + if (toTime() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property toTime in model ThrottledRequestsInput")); + } } + private static final ClientLogger LOGGER = new ClientLogger(ThrottledRequestsInput.class); + /** * {@inheritDoc} */ diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/UpdateResourceDefinition.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/UpdateResourceDefinition.java index cea7f13cb69cd..91ba61f0def84 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/UpdateResourceDefinition.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/UpdateResourceDefinition.java @@ -23,9 +23,9 @@ public class UpdateResourceDefinition extends ProxyResource { private Map tags; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -33,9 +33,9 @@ public class UpdateResourceDefinition extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of UpdateResourceDefinition class. @@ -64,13 +64,13 @@ public UpdateResourceDefinition withTags(Map tags) { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -84,13 +84,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/UserArtifactSettings.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/UserArtifactSettings.java index aa0910f396036..cf26681edc28c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/UserArtifactSettings.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/UserArtifactSettings.java @@ -29,6 +29,12 @@ public final class UserArtifactSettings implements JsonSerializable { + /** + * Static value Unknown for ValidationStatus. + */ + public static final ValidationStatus UNKNOWN = fromString("Unknown"); + + /** + * Static value Failed for ValidationStatus. + */ + public static final ValidationStatus FAILED = fromString("Failed"); + + /** + * Static value Succeeded for ValidationStatus. + */ + public static final ValidationStatus SUCCEEDED = fromString("Succeeded"); + + /** + * Creates a new instance of ValidationStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ValidationStatus() { + } + + /** + * Creates or finds a ValidationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ValidationStatus. + */ + public static ValidationStatus fromString(String name) { + return fromString(name, ValidationStatus.class); + } + + /** + * Gets known ValidationStatus values. + * + * @return known ValidationStatus values. + */ + public static Collection values() { + return values(ValidationStatus.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ValidationsProfile.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ValidationsProfile.java new file mode 100644 index 0000000000000..3e9735715b27b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ValidationsProfile.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * This is the validations profile of a Gallery Image Version. + */ +@Fluent +public final class ValidationsProfile implements JsonSerializable { + /* + * The published time of the image version + */ + private String validationEtag; + + /* + * The executedValidations property. + */ + private List executedValidations; + + /* + * This specifies the pub, offer, sku and version of the image version metadata + */ + private List platformAttributes; + + /** + * Creates an instance of ValidationsProfile class. + */ + public ValidationsProfile() { + } + + /** + * Get the validationEtag property: The published time of the image version. + * + * @return the validationEtag value. + */ + public String validationEtag() { + return this.validationEtag; + } + + /** + * Set the validationEtag property: The published time of the image version. + * + * @param validationEtag the validationEtag value to set. + * @return the ValidationsProfile object itself. + */ + public ValidationsProfile withValidationEtag(String validationEtag) { + this.validationEtag = validationEtag; + return this; + } + + /** + * Get the executedValidations property: The executedValidations property. + * + * @return the executedValidations value. + */ + public List executedValidations() { + return this.executedValidations; + } + + /** + * Set the executedValidations property: The executedValidations property. + * + * @param executedValidations the executedValidations value to set. + * @return the ValidationsProfile object itself. + */ + public ValidationsProfile withExecutedValidations(List executedValidations) { + this.executedValidations = executedValidations; + return this; + } + + /** + * Get the platformAttributes property: This specifies the pub, offer, sku and version of the image version + * metadata. + * + * @return the platformAttributes value. + */ + public List platformAttributes() { + return this.platformAttributes; + } + + /** + * Set the platformAttributes property: This specifies the pub, offer, sku and version of the image version + * metadata. + * + * @param platformAttributes the platformAttributes value to set. + * @return the ValidationsProfile object itself. + */ + public ValidationsProfile withPlatformAttributes(List platformAttributes) { + this.platformAttributes = platformAttributes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (executedValidations() != null) { + executedValidations().forEach(e -> e.validate()); + } + if (platformAttributes() != null) { + platformAttributes().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("validationEtag", this.validationEtag); + jsonWriter.writeArrayField("executedValidations", this.executedValidations, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("platformAttributes", this.platformAttributes, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ValidationsProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidationsProfile if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ValidationsProfile. + */ + public static ValidationsProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidationsProfile deserializedValidationsProfile = new ValidationsProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("validationEtag".equals(fieldName)) { + deserializedValidationsProfile.validationEtag = reader.getString(); + } else if ("executedValidations".equals(fieldName)) { + List executedValidations + = reader.readArray(reader1 -> ExecutedValidation.fromJson(reader1)); + deserializedValidationsProfile.executedValidations = executedValidations; + } else if ("platformAttributes".equals(fieldName)) { + List platformAttributes + = reader.readArray(reader1 -> PlatformAttribute.fromJson(reader1)); + deserializedValidationsProfile.platformAttributes = platformAttributes; + } else { + reader.skipChildren(); + } + } + + return deserializedValidationsProfile; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineExtensionUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineExtensionUpdate.java index 25c401d25ff94..3ae62638cccc3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineExtensionUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineExtensionUpdate.java @@ -300,7 +300,6 @@ public KeyVaultSecretReference protectedSettingsFromKeyVault() { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineRunCommandUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineRunCommandUpdate.java index 092c78116310b..ab6bd09a052e6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineRunCommandUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineRunCommandUpdate.java @@ -389,7 +389,6 @@ public VirtualMachineRunCommandUpdate withTreatFailureAsDeploymentFailure(Boolea */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetExtensionUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetExtensionUpdate.java index be710a54c7ae9..b660c2e49e208 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetExtensionUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetExtensionUpdate.java @@ -368,7 +368,6 @@ public KeyVaultSecretReference protectedSettingsFromKeyVault() { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetReimageParameters.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetReimageParameters.java index 62264ecbf3d75..eedae7046c5f3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetReimageParameters.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetReimageParameters.java @@ -96,7 +96,9 @@ public VirtualMachineScaleSetReimageParameters withOsProfile(OSProfileProvisioni */ @Override public void validate() { - super.validate(); + if (osProfile() != null) { + osProfile().validate(); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdate.java index a6e2ee9ceb057..97c434f281bbf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdate.java @@ -500,7 +500,6 @@ public VirtualMachineScaleSetUpdate withSkuProfile(SkuProfile skuProfile) { */ @Override public void validate() { - super.validate(); if (sku() != null) { sku().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMExtensionUpdate.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMExtensionUpdate.java index d2b88ac8168fc..17e4d90a5b13a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMExtensionUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMExtensionUpdate.java @@ -333,7 +333,6 @@ public KeyVaultSecretReference protectedSettingsFromKeyVault() { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMReimageParameters.java b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMReimageParameters.java index 7e352f3a694a6..7f06d5693a2c7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMReimageParameters.java +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMReimageParameters.java @@ -83,7 +83,9 @@ public VirtualMachineScaleSetVMReimageParameters withOsProfile(OSProfileProvisio */ @Override public void validate() { - super.validate(); + if (osProfile() != null) { + osProfile().validate(); + } } /** diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-compute/proxy-config.json b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-compute/proxy-config.json index 026f60999befe..dab362f94aee0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-compute/proxy-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-compute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-compute/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.compute.implementation.AvailabilitySetsClientImpl$AvailabilitySetsService"],["com.azure.resourcemanager.compute.implementation.CapacityReservationGroupsClientImpl$CapacityReservationGroupsService"],["com.azure.resourcemanager.compute.implementation.CapacityReservationsClientImpl$CapacityReservationsService"],["com.azure.resourcemanager.compute.implementation.CloudServiceOperatingSystemsClientImpl$CloudServiceOperatingSystemsService"],["com.azure.resourcemanager.compute.implementation.CloudServiceRoleInstancesClientImpl$CloudServiceRoleInstancesService"],["com.azure.resourcemanager.compute.implementation.CloudServiceRolesClientImpl$CloudServiceRolesService"],["com.azure.resourcemanager.compute.implementation.CloudServicesClientImpl$CloudServicesService"],["com.azure.resourcemanager.compute.implementation.CloudServicesUpdateDomainsClientImpl$CloudServicesUpdateDomainsService"],["com.azure.resourcemanager.compute.implementation.CommunityGalleriesClientImpl$CommunityGalleriesService"],["com.azure.resourcemanager.compute.implementation.CommunityGalleryImageVersionsClientImpl$CommunityGalleryImageVersionsService"],["com.azure.resourcemanager.compute.implementation.CommunityGalleryImagesClientImpl$CommunityGalleryImagesService"],["com.azure.resourcemanager.compute.implementation.DedicatedHostGroupsClientImpl$DedicatedHostGroupsService"],["com.azure.resourcemanager.compute.implementation.DedicatedHostsClientImpl$DedicatedHostsService"],["com.azure.resourcemanager.compute.implementation.DiskAccessesClientImpl$DiskAccessesService"],["com.azure.resourcemanager.compute.implementation.DiskEncryptionSetsClientImpl$DiskEncryptionSetsService"],["com.azure.resourcemanager.compute.implementation.DiskRestorePointsClientImpl$DiskRestorePointsService"],["com.azure.resourcemanager.compute.implementation.DisksClientImpl$DisksService"],["com.azure.resourcemanager.compute.implementation.GalleriesClientImpl$GalleriesService"],["com.azure.resourcemanager.compute.implementation.GalleryApplicationVersionsClientImpl$GalleryApplicationVersionsService"],["com.azure.resourcemanager.compute.implementation.GalleryApplicationsClientImpl$GalleryApplicationsService"],["com.azure.resourcemanager.compute.implementation.GalleryImageVersionsClientImpl$GalleryImageVersionsService"],["com.azure.resourcemanager.compute.implementation.GalleryImagesClientImpl$GalleryImagesService"],["com.azure.resourcemanager.compute.implementation.GallerySharingProfilesClientImpl$GallerySharingProfilesService"],["com.azure.resourcemanager.compute.implementation.ImagesClientImpl$ImagesService"],["com.azure.resourcemanager.compute.implementation.LogAnalyticsClientImpl$LogAnalyticsService"],["com.azure.resourcemanager.compute.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.compute.implementation.ProximityPlacementGroupsClientImpl$ProximityPlacementGroupsService"],["com.azure.resourcemanager.compute.implementation.ResourceSkusClientImpl$ResourceSkusService"],["com.azure.resourcemanager.compute.implementation.RestorePointCollectionsClientImpl$RestorePointCollectionsService"],["com.azure.resourcemanager.compute.implementation.RestorePointsClientImpl$RestorePointsService"],["com.azure.resourcemanager.compute.implementation.SharedGalleriesClientImpl$SharedGalleriesService"],["com.azure.resourcemanager.compute.implementation.SharedGalleryImageVersionsClientImpl$SharedGalleryImageVersionsService"],["com.azure.resourcemanager.compute.implementation.SharedGalleryImagesClientImpl$SharedGalleryImagesService"],["com.azure.resourcemanager.compute.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.compute.implementation.SshPublicKeysClientImpl$SshPublicKeysService"],["com.azure.resourcemanager.compute.implementation.UsagesClientImpl$UsagesService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineExtensionImagesClientImpl$VirtualMachineExtensionImagesService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineExtensionsClientImpl$VirtualMachineExtensionsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineImagesClientImpl$VirtualMachineImagesService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineImagesEdgeZonesClientImpl$VirtualMachineImagesEdgeZonesService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineRunCommandsClientImpl$VirtualMachineRunCommandsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineScaleSetExtensionsClientImpl$VirtualMachineScaleSetExtensionsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineScaleSetRollingUpgradesClientImpl$VirtualMachineScaleSetRollingUpgradesService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineScaleSetVMExtensionsClientImpl$VirtualMachineScaleSetVMExtensionsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineScaleSetVMRunCommandsClientImpl$VirtualMachineScaleSetVMRunCommandsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineScaleSetVMsClientImpl$VirtualMachineScaleSetVMsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineScaleSetsClientImpl$VirtualMachineScaleSetsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineSizesClientImpl$VirtualMachineSizesService"],["com.azure.resourcemanager.compute.implementation.VirtualMachinesClientImpl$VirtualMachinesService"]] \ No newline at end of file +[["com.azure.resourcemanager.compute.implementation.AvailabilitySetsClientImpl$AvailabilitySetsService"],["com.azure.resourcemanager.compute.implementation.CapacityReservationGroupsClientImpl$CapacityReservationGroupsService"],["com.azure.resourcemanager.compute.implementation.CapacityReservationsClientImpl$CapacityReservationsService"],["com.azure.resourcemanager.compute.implementation.CloudServiceOperatingSystemsClientImpl$CloudServiceOperatingSystemsService"],["com.azure.resourcemanager.compute.implementation.CloudServiceRoleInstancesClientImpl$CloudServiceRoleInstancesService"],["com.azure.resourcemanager.compute.implementation.CloudServiceRolesClientImpl$CloudServiceRolesService"],["com.azure.resourcemanager.compute.implementation.CloudServicesClientImpl$CloudServicesService"],["com.azure.resourcemanager.compute.implementation.CloudServicesUpdateDomainsClientImpl$CloudServicesUpdateDomainsService"],["com.azure.resourcemanager.compute.implementation.CommunityGalleriesClientImpl$CommunityGalleriesService"],["com.azure.resourcemanager.compute.implementation.CommunityGalleryImageVersionsClientImpl$CommunityGalleryImageVersionsService"],["com.azure.resourcemanager.compute.implementation.CommunityGalleryImagesClientImpl$CommunityGalleryImagesService"],["com.azure.resourcemanager.compute.implementation.DedicatedHostGroupsClientImpl$DedicatedHostGroupsService"],["com.azure.resourcemanager.compute.implementation.DedicatedHostsClientImpl$DedicatedHostsService"],["com.azure.resourcemanager.compute.implementation.DiskAccessesClientImpl$DiskAccessesService"],["com.azure.resourcemanager.compute.implementation.DiskEncryptionSetsClientImpl$DiskEncryptionSetsService"],["com.azure.resourcemanager.compute.implementation.DiskRestorePointsClientImpl$DiskRestorePointsService"],["com.azure.resourcemanager.compute.implementation.DisksClientImpl$DisksService"],["com.azure.resourcemanager.compute.implementation.GalleriesClientImpl$GalleriesService"],["com.azure.resourcemanager.compute.implementation.GalleryApplicationVersionsClientImpl$GalleryApplicationVersionsService"],["com.azure.resourcemanager.compute.implementation.GalleryApplicationsClientImpl$GalleryApplicationsService"],["com.azure.resourcemanager.compute.implementation.GalleryImageVersionsClientImpl$GalleryImageVersionsService"],["com.azure.resourcemanager.compute.implementation.GalleryImagesClientImpl$GalleryImagesService"],["com.azure.resourcemanager.compute.implementation.GalleryInVMAccessControlProfileVersionsClientImpl$GalleryInVMAccessControlProfileVersionsService"],["com.azure.resourcemanager.compute.implementation.GalleryInVMAccessControlProfilesClientImpl$GalleryInVMAccessControlProfilesService"],["com.azure.resourcemanager.compute.implementation.GallerySharingProfilesClientImpl$GallerySharingProfilesService"],["com.azure.resourcemanager.compute.implementation.ImagesClientImpl$ImagesService"],["com.azure.resourcemanager.compute.implementation.LogAnalyticsClientImpl$LogAnalyticsService"],["com.azure.resourcemanager.compute.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.compute.implementation.ProximityPlacementGroupsClientImpl$ProximityPlacementGroupsService"],["com.azure.resourcemanager.compute.implementation.ResourceSkusClientImpl$ResourceSkusService"],["com.azure.resourcemanager.compute.implementation.RestorePointCollectionsClientImpl$RestorePointCollectionsService"],["com.azure.resourcemanager.compute.implementation.RestorePointsClientImpl$RestorePointsService"],["com.azure.resourcemanager.compute.implementation.SharedGalleriesClientImpl$SharedGalleriesService"],["com.azure.resourcemanager.compute.implementation.SharedGalleryImageVersionsClientImpl$SharedGalleryImageVersionsService"],["com.azure.resourcemanager.compute.implementation.SharedGalleryImagesClientImpl$SharedGalleryImagesService"],["com.azure.resourcemanager.compute.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.compute.implementation.SoftDeletedResourcesClientImpl$SoftDeletedResourcesService"],["com.azure.resourcemanager.compute.implementation.SshPublicKeysClientImpl$SshPublicKeysService"],["com.azure.resourcemanager.compute.implementation.UsagesClientImpl$UsagesService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineExtensionImagesClientImpl$VirtualMachineExtensionImagesService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineExtensionsClientImpl$VirtualMachineExtensionsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineImagesClientImpl$VirtualMachineImagesService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineImagesEdgeZonesClientImpl$VirtualMachineImagesEdgeZonesService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineRunCommandsClientImpl$VirtualMachineRunCommandsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineScaleSetExtensionsClientImpl$VirtualMachineScaleSetExtensionsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineScaleSetRollingUpgradesClientImpl$VirtualMachineScaleSetRollingUpgradesService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineScaleSetVMExtensionsClientImpl$VirtualMachineScaleSetVMExtensionsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineScaleSetVMRunCommandsClientImpl$VirtualMachineScaleSetVMRunCommandsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineScaleSetVMsClientImpl$VirtualMachineScaleSetVMsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineScaleSetsClientImpl$VirtualMachineScaleSetsService"],["com.azure.resourcemanager.compute.implementation.VirtualMachineSizesClientImpl$VirtualMachineSizesService"],["com.azure.resourcemanager.compute.implementation.VirtualMachinesClientImpl$VirtualMachinesService"]] \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleriesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleriesGetSamples.java index c251034369bfb..8cdd3e40f392a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleriesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleriesGetSamples.java @@ -10,7 +10,7 @@ public final class CommunityGalleriesGetSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ * communityGalleryExamples/CommunityGallery_Get.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImageVersionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImageVersionsGetSamples.java index 8872cd224bd6c..202219d8f5ad6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImageVersionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImageVersionsGetSamples.java @@ -10,7 +10,7 @@ public final class CommunityGalleryImageVersionsGetSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ * communityGalleryExamples/CommunityGalleryImageVersion_Get.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImageVersionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImageVersionsListSamples.java index e13a92d7cfa56..bcca3988f0b2e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImageVersionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImageVersionsListSamples.java @@ -10,7 +10,7 @@ public final class CommunityGalleryImageVersionsListSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ * communityGalleryExamples/CommunityGalleryImageVersion_List.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImagesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImagesGetSamples.java index 087bf1c12b122..677088793d384 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImagesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImagesGetSamples.java @@ -10,7 +10,7 @@ public final class CommunityGalleryImagesGetSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ * communityGalleryExamples/CommunityGalleryImage_Get.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImagesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImagesListSamples.java index 3c6d4201b234e..104c1e73007df 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImagesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/CommunityGalleryImagesListSamples.java @@ -10,7 +10,7 @@ public final class CommunityGalleryImagesListSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ * communityGalleryExamples/CommunityGalleryImage_List.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesCreateOrUpdateSamples.java index ca55abf249489..feb178d02a7d1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesCreateOrUpdateSamples.java @@ -6,9 +6,14 @@ import com.azure.resourcemanager.compute.fluent.models.GalleryInner; import com.azure.resourcemanager.compute.models.CommunityGalleryInfo; +import com.azure.resourcemanager.compute.models.GalleryIdentity; import com.azure.resourcemanager.compute.models.GallerySharingPermissionTypes; +import com.azure.resourcemanager.compute.models.ResourceIdentityType; import com.azure.resourcemanager.compute.models.SharingProfile; import com.azure.resourcemanager.compute.models.SoftDeletePolicy; +import com.azure.resourcemanager.compute.models.VirtualMachineIdentityUserAssignedIdentities; +import java.util.HashMap; +import java.util.Map; /** * Samples for Galleries CreateOrUpdate. @@ -16,7 +21,7 @@ public final class GalleriesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * CommunityGallery_Create.json */ /** @@ -42,7 +47,31 @@ public static void createACommunityGallery(com.azure.resourcemanager.AzureResour /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ + * Gallery_Create_WithManagedIdentity.json + */ + /** + * Sample code: Create or update a simple gallery with system-assigned and user-assigned managed identities. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void createOrUpdateASimpleGalleryWithSystemAssignedAndUserAssignedManagedIdentities( + com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleries() + .createOrUpdate("myResourceGroup", "myGalleryName", new GalleryInner().withLocation("West US") + .withIdentity(new GalleryIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", + new VirtualMachineIdentityUserAssignedIdentities()))) + .withDescription("This is the gallery description."), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * Gallery_Create_WithSharingProfile.json */ /** @@ -65,7 +94,7 @@ public static void createACommunityGallery(com.azure.resourcemanager.AzureResour /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * Gallery_Create.json */ /** @@ -85,7 +114,7 @@ public static void createOrUpdateASimpleGallery(com.azure.resourcemanager.AzureR /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * Gallery_Create_SoftDeletionEnabled.json */ /** @@ -105,4 +134,16 @@ public static void createOrUpdateASimpleGallery(com.azure.resourcemanager.AzureR .withSoftDeletePolicy(new SoftDeletePolicy().withIsSoftDeleteEnabled(true)), com.azure.core.util.Context.NONE); } + + // Use "Map.of" if available + @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/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesDeleteSamples.java index ed8aee26f50a5..a46ac760732ed 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesDeleteSamples.java @@ -10,7 +10,7 @@ public final class GalleriesDeleteSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * Gallery_Delete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesGetByResourceGroupSamples.java index d7813e3609262..d4b39bb1bb929 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesGetByResourceGroupSamples.java @@ -13,7 +13,7 @@ public final class GalleriesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * CommunityGallery_Get.json */ /** @@ -32,7 +32,7 @@ public static void getACommunityGallery(com.azure.resourcemanager.AzureResourceM /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * Gallery_Get_WithSelectPermissions.json */ /** @@ -51,7 +51,7 @@ public static void getAGalleryWithSelectPermissions(com.azure.resourcemanager.Az /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * Gallery_Get.json */ /** @@ -70,7 +70,7 @@ public static void getAGallery(com.azure.resourcemanager.AzureResourceManager az /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * Gallery_Get_WithExpandSharingProfileGroups.json */ /** @@ -86,4 +86,24 @@ public static void getAGalleryWithExpandSharingProfileGroups(com.azure.resourcem .getByResourceGroupWithResponse("myResourceGroup", "myGalleryName", null, GalleryExpandParams.SHARING_PROFILE_GROUPS, com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ + * Gallery_Get_WithManagedIdentity.json + */ + /** + * Sample code: Get a gallery with system-assigned and user-assigned managed identities. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void getAGalleryWithSystemAssignedAndUserAssignedManagedIdentities( + com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleries() + .getByResourceGroupWithResponse("myResourceGroup", "myGalleryName", null, null, + com.azure.core.util.Context.NONE); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesListByResourceGroupSamples.java index 1055fbf141ce7..1362bf3ab2cad 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class GalleriesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * Gallery_ListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesListSamples.java index d5bb3050a187e..b03c483c26a20 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesListSamples.java @@ -10,7 +10,7 @@ public final class GalleriesListSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * Gallery_ListBySubscription.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesUpdateSamples.java index 582a4c5985491..29e5b7b161b54 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleriesUpdateSamples.java @@ -12,7 +12,7 @@ public final class GalleriesUpdateSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * Gallery_Update.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsCreateOrUpdateSamples.java index d0d6c2627078f..6251a53961330 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsCreateOrUpdateSamples.java @@ -23,7 +23,7 @@ public final class GalleryApplicationVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryApplicationVersion_Create.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsDeleteSamples.java index e6f51aa3111c4..480a122b0dc6d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsDeleteSamples.java @@ -10,7 +10,7 @@ public final class GalleryApplicationVersionsDeleteSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryApplicationVersion_Delete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsGetSamples.java index dc8f7b6fe5094..f31fb8b68085e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsGetSamples.java @@ -12,7 +12,7 @@ public final class GalleryApplicationVersionsGetSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryApplicationVersion_Get.json */ /** @@ -31,7 +31,7 @@ public static void getAGalleryApplicationVersion(com.azure.resourcemanager.Azure /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryApplicationVersion_Get_WithReplicationStatus.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsListByGalleryApplicationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsListByGalleryApplicationSamples.java index 00343fa392689..6dbdb3319674a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsListByGalleryApplicationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsListByGalleryApplicationSamples.java @@ -10,7 +10,7 @@ public final class GalleryApplicationVersionsListByGalleryApplicationSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryApplicationVersion_ListByGalleryApplication.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsUpdateSamples.java index b8bdd1385d97d..ad5eb4cc46b50 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationVersionsUpdateSamples.java @@ -20,7 +20,7 @@ public final class GalleryApplicationVersionsUpdateSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryApplicationVersion_Update.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsCreateOrUpdateSamples.java index 73c691a9dd721..9043dfe5ae8b1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ public final class GalleryApplicationsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryApplication_Create.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsDeleteSamples.java index 29941542b5971..e70cf58a9913e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsDeleteSamples.java @@ -10,7 +10,7 @@ public final class GalleryApplicationsDeleteSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryApplication_Delete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsGetSamples.java index 488ad0c8f7412..068f41153cc41 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsGetSamples.java @@ -10,7 +10,7 @@ public final class GalleryApplicationsGetSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryApplication_Get.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsListByGallerySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsListByGallerySamples.java index 1c69bdf1aa58f..221e65a3168cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsListByGallerySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsListByGallerySamples.java @@ -10,7 +10,7 @@ public final class GalleryApplicationsListByGallerySamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryApplication_ListByGallery.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsUpdateSamples.java index 7620a592060fe..521b641c7c3b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryApplicationsUpdateSamples.java @@ -17,7 +17,7 @@ public final class GalleryApplicationsUpdateSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryApplication_Update.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsCreateOrUpdateSamples.java index e4f80d8956b12..8c815d3d86c1e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsCreateOrUpdateSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.compute.generated; import com.azure.resourcemanager.compute.fluent.models.GalleryImageVersionInner; +import com.azure.resourcemanager.compute.models.AdditionalReplicaSet; import com.azure.resourcemanager.compute.models.DataDiskImageEncryption; import com.azure.resourcemanager.compute.models.EncryptionImages; import com.azure.resourcemanager.compute.models.GalleryArtifactVersionFullSource; @@ -33,7 +34,7 @@ public final class GalleryImageVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Create_WithShallowReplicationMode.json */ /** @@ -58,13 +59,14 @@ public static void createOrUpdateASimpleGalleryImageVersionUsingShallowReplicati .withSource(new GalleryArtifactVersionFullSource().withId( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}"))) .withSafetyProfile( - new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false)), + new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false) + .withBlockDeletionBeforeEndOfLife(false)), com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Create_WithVHD.json */ /** @@ -107,13 +109,14 @@ public static void createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource( "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}")) .withLun(1)))) .withSafetyProfile( - new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false)), + new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false) + .withBlockDeletionBeforeEndOfLife(false)), com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Create_WithVmAsSource.json */ /** @@ -159,13 +162,14 @@ public static void createOrUpdateASimpleGalleryImageVersionUsingVhdAsASource( .withSource(new GalleryArtifactVersionFullSource().withVirtualMachineId( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName}"))) .withSafetyProfile( - new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false)), + new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false) + .withBlockDeletionBeforeEndOfLife(false)), com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Create_WithImageVersionAsSource.json */ /** @@ -211,13 +215,14 @@ public static void createOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSou .withSource(new GalleryArtifactVersionFullSource().withId( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}"))) .withSafetyProfile( - new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false)), + new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false) + .withBlockDeletionBeforeEndOfLife(false)), com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Create_WithVHD_UefiSettings.json */ /** @@ -260,7 +265,8 @@ public static void createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWith "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}")) .withLun(1)))) .withSafetyProfile( - new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false)) + new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false) + .withBlockDeletionBeforeEndOfLife(false)) .withSecurityProfile( new ImageVersionSecurityProfile().withUefiSettings(new GalleryImageVersionUefiSettings() .withSignatureTemplateNames( @@ -277,7 +283,7 @@ public static void createOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWith /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Create_WithSnapshotsAsSource.json */ /** @@ -322,13 +328,14 @@ public static void createOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSna "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}")) .withLun(1)))) .withSafetyProfile( - new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false)), + new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false) + .withBlockDeletionBeforeEndOfLife(false)), com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Create_WithSnapshotsAsSource.json */ /** @@ -373,13 +380,14 @@ public static void createOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASour "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}")) .withLun(1)))) .withSafetyProfile( - new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false)), + new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false) + .withBlockDeletionBeforeEndOfLife(false)), com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Create_WithTargetExtendedLocations.json */ /** @@ -425,13 +433,14 @@ public static void createOrUpdateASimpleGalleryImageVersionWithTargetExtendedLoc .withSource(new GalleryArtifactVersionFullSource().withId( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}"))) .withSafetyProfile( - new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false)), + new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false) + .withBlockDeletionBeforeEndOfLife(false)), com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Create_WithCommunityImageVersionAsSource.json */ /** @@ -477,13 +486,14 @@ public static void createOrUpdateASimpleGalleryImageVersionUsingCommunityGallery .withSource(new GalleryArtifactVersionFullSource().withCommunityGalleryImageId( "/communityGalleries/{communityGalleryName}/images/{communityGalleryImageName}"))) .withSafetyProfile( - new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false)), + new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false) + .withBlockDeletionBeforeEndOfLife(false)), com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Create.json */ /** @@ -528,6 +538,62 @@ public static void createOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSo .withStorageProfile(new GalleryImageVersionStorageProfile() .withSource(new GalleryArtifactVersionFullSource().withId( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}"))) + .withSafetyProfile( + new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false) + .withBlockDeletionBeforeEndOfLife(false)), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ + * GalleryImageVersion_Create_WithAdditionalReplicaSets.json + */ + /** + * Sample code: Create or update a simple Gallery Image Version with Direct Drive replicas. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void createOrUpdateASimpleGalleryImageVersionWithDirectDriveReplicas( + com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryImageVersions() + .createOrUpdate("myResourceGroup", "myGalleryName", "myGalleryImageName", "1.0.0", + new GalleryImageVersionInner().withLocation("West US") + .withPublishingProfile(new GalleryImageVersionPublishingProfile().withTargetRegions(Arrays.asList( + new TargetRegion().withName("West US") + .withRegionalReplicaCount(1) + .withEncryption(new EncryptionImages() + .withOsDiskImage(new OSDiskImageEncryption().withDiskEncryptionSetId( + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet")) + .withDataDiskImages(Arrays.asList(new DataDiskImageEncryption().withDiskEncryptionSetId( + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet") + .withLun(0), + new DataDiskImageEncryption().withDiskEncryptionSetId( + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet") + .withLun(1)))) + .withExcludeFromLatest(false) + .withAdditionalReplicaSets(Arrays.asList(new AdditionalReplicaSet() + .withStorageAccountType(StorageAccountType.fromString("PreviumV2_LRS")) + .withRegionalReplicaCount(1))), + new TargetRegion().withName("East US") + .withRegionalReplicaCount(2) + .withStorageAccountType(StorageAccountType.STANDARD_ZRS) + .withEncryption(new EncryptionImages() + .withOsDiskImage(new OSDiskImageEncryption().withDiskEncryptionSetId( + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet")) + .withDataDiskImages(Arrays.asList(new DataDiskImageEncryption().withDiskEncryptionSetId( + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet") + .withLun(0), + new DataDiskImageEncryption().withDiskEncryptionSetId( + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet") + .withLun(1)))) + .withExcludeFromLatest(false)))) + .withStorageProfile(new GalleryImageVersionStorageProfile() + .withSource(new GalleryArtifactVersionFullSource().withId( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}"))) .withSafetyProfile( new GalleryImageVersionSafetyProfile().withAllowDeletionOfReplicatedLocations(false)), com.azure.core.util.Context.NONE); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsDeleteSamples.java index b48705610203a..601327b8b6209 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsDeleteSamples.java @@ -10,7 +10,7 @@ public final class GalleryImageVersionsDeleteSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Delete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsGetSamples.java index 169759e9e3790..e3cbc8ff121dc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsGetSamples.java @@ -12,7 +12,7 @@ public final class GalleryImageVersionsGetSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Get_WithVhdAsSource.json */ /** @@ -31,7 +31,28 @@ public static void getAGalleryImageVersionWithVhdAsASource(com.azure.resourceman /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ + * GalleryImageVersion_Get_WithValidationProfileAndReplicationStatus.json + */ + /** + * Sample code: Get a gallery image version with validation profile and replication status. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void getAGalleryImageVersionWithValidationProfileAndReplicationStatus( + com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryImageVersions() + .getWithResponse("myResourceGroup", "myGalleryName", "myGalleryImageName", "1.0.0", + ReplicationStatusTypes.fromString("ValidationProfile,ReplicationStatus"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Get.json */ /** @@ -50,7 +71,7 @@ public static void getAGalleryImageVersion(com.azure.resourcemanager.AzureResour /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Get_WithReplicationStatus.json */ /** @@ -70,7 +91,7 @@ public static void getAGalleryImageVersion(com.azure.resourcemanager.AzureResour /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Get_WithSnapshotsAsSource.json */ /** @@ -87,4 +108,24 @@ public static void getAGalleryImageVersion(com.azure.resourcemanager.AzureResour .getWithResponse("myResourceGroup", "myGalleryName", "myGalleryImageName", "1.0.0", null, com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ + * GalleryImageVersion_Get_WithValidationProfile.json + */ + /** + * Sample code: Get a gallery image version with validation profile. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + getAGalleryImageVersionWithValidationProfile(com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryImageVersions() + .getWithResponse("myResourceGroup", "myGalleryName", "myGalleryImageName", "1.0.0", + ReplicationStatusTypes.fromString("ValidationProfile"), com.azure.core.util.Context.NONE); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsListByGalleryImageSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsListByGalleryImageSamples.java index bb565fa7ddc62..2323ffa60ecf1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsListByGalleryImageSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsListByGalleryImageSamples.java @@ -10,7 +10,7 @@ public final class GalleryImageVersionsListByGalleryImageSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_ListByGalleryImage.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsUpdateSamples.java index a99152732e0d5..128d5446cf2ba 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImageVersionsUpdateSamples.java @@ -18,7 +18,7 @@ public final class GalleryImageVersionsUpdateSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Update.json */ /** @@ -46,7 +46,28 @@ public final class GalleryImageVersionsUpdateSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ + * GalleryImageVersion_Update_RestoreSoftDeleted.json + */ + /** + * Sample code: Restore a Soft Deleted Gallery Image Version. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void restoreASoftDeletedGalleryImageVersion(com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryImageVersions() + .update("myResourceGroup", "myGalleryName", "myGalleryImageName", "1.0.0", + new GalleryImageVersionUpdate().withStorageProfile(new GalleryImageVersionStorageProfile()) + .withRestore(true), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImageVersion_Update_WithoutSourceId.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesCreateOrUpdateSamples.java index d00319431de67..a0d7047a34964 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ public final class GalleryImagesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImage_Create.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesDeleteSamples.java index aa36964403514..9a9fa436f9292 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesDeleteSamples.java @@ -10,7 +10,7 @@ public final class GalleryImagesDeleteSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImage_Delete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesGetSamples.java index 390be8bfb1d77..7ee02a823ad59 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesGetSamples.java @@ -10,7 +10,7 @@ public final class GalleryImagesGetSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImage_Get.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesListByGallerySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesListByGallerySamples.java index e8519aca6bb66..e629fb392d99b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesListByGallerySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesListByGallerySamples.java @@ -10,7 +10,7 @@ public final class GalleryImagesListByGallerySamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImage_ListByGallery.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesUpdateSamples.java index 3765f58473c57..d3b4a40822470 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryImagesUpdateSamples.java @@ -4,11 +4,13 @@ package com.azure.resourcemanager.compute.generated; +import com.azure.resourcemanager.compute.models.GalleryImageFeature; import com.azure.resourcemanager.compute.models.GalleryImageIdentifier; import com.azure.resourcemanager.compute.models.GalleryImageUpdate; import com.azure.resourcemanager.compute.models.HyperVGeneration; import com.azure.resourcemanager.compute.models.OperatingSystemStateTypes; import com.azure.resourcemanager.compute.models.OperatingSystemTypes; +import java.util.Arrays; /** * Samples for GalleryImages Update. @@ -16,7 +18,36 @@ public final class GalleryImagesUpdateSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ + * GalleryImage_UpdateFeatures.json + */ + /** + * Sample code: Update a gallery image feature. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void updateAGalleryImageFeature(com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryImages() + .update("myResourceGroup", "myGalleryName", "myGalleryImageName", + new GalleryImageUpdate().withOsType(OperatingSystemTypes.WINDOWS) + .withOsState(OperatingSystemStateTypes.GENERALIZED) + .withHyperVGeneration(HyperVGeneration.V2) + .withIdentifier(new GalleryImageIdentifier().withPublisher("myPublisherName") + .withOffer("myOfferName") + .withSku("mySkuName")) + .withFeatures(Arrays.asList(new GalleryImageFeature().withName("SecurityType") + .withValue("TrustedLaunch") + .withStartsAtVersion("2.0.0"))) + .withAllowUpdateImage(true), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * GalleryImage_Update.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..dc09d2e69c0ab --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsCreateOrUpdateSamples.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.compute.generated; + +import com.azure.resourcemanager.compute.fluent.models.GalleryInVMAccessControlProfileVersionInner; +import com.azure.resourcemanager.compute.models.AccessControlRules; +import com.azure.resourcemanager.compute.models.AccessControlRulesIdentity; +import com.azure.resourcemanager.compute.models.AccessControlRulesMode; +import com.azure.resourcemanager.compute.models.AccessControlRulesPrivilege; +import com.azure.resourcemanager.compute.models.AccessControlRulesRole; +import com.azure.resourcemanager.compute.models.AccessControlRulesRoleAssignment; +import com.azure.resourcemanager.compute.models.EndpointAccess; +import com.azure.resourcemanager.compute.models.TargetRegion; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for GalleryInVMAccessControlProfileVersions CreateOrUpdate. + */ +public final class GalleryInVMAccessControlProfileVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ + * galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Create.json + */ + /** + * Sample code: Create or update a Gallery InVMAccessControlProfile Version. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + createOrUpdateAGalleryInVMAccessControlProfileVersion(com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryInVMAccessControlProfileVersions() + .createOrUpdate("myResourceGroup", "myGalleryName", "myInVMAccessControlProfileName", "1.0.0", + new GalleryInVMAccessControlProfileVersionInner().withLocation("West US") + .withMode(AccessControlRulesMode.AUDIT) + .withDefaultAccess(EndpointAccess.ALLOW) + .withRules(new AccessControlRules() + .withPrivileges(Arrays.asList(new AccessControlRulesPrivilege().withName("GoalState") + .withPath("/machine") + .withQueryParameters(mapOf("comp", "goalstate")))) + .withRoles(Arrays.asList(new AccessControlRulesRole().withName("Provisioning") + .withPrivileges(Arrays.asList("GoalState")))) + .withIdentities(Arrays.asList(new AccessControlRulesIdentity().withName("WinPA") + .withUsername("SYSTEM") + .withGroupName("Administrators") + .withExePath("C:\\Windows\\System32\\cscript.exe") + .withProcessName("cscript"))) + .withRoleAssignments( + Arrays.asList(new AccessControlRulesRoleAssignment().withRole("Provisioning") + .withIdentities(Arrays.asList("WinPA"))))) + .withTargetLocations(Arrays.asList(new TargetRegion().withName("West US"), + new TargetRegion().withName("South Central US"))) + .withExcludeFromLatest(false), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @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/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsDeleteSamples.java new file mode 100644 index 0000000000000..9428e9a96dca9 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsDeleteSamples.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.compute.generated; + +/** + * Samples for GalleryInVMAccessControlProfileVersions Delete. + */ +public final class GalleryInVMAccessControlProfileVersionsDeleteSamples { + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ + * galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Delete.json + */ + /** + * Sample code: Delete a gallery inVMAccessControlProfile version. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + deleteAGalleryInVMAccessControlProfileVersion(com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryInVMAccessControlProfileVersions() + .delete("myResourceGroup", "myGalleryName", "myInVMAccessControlProfileName", "1.0.0", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsGetSamples.java new file mode 100644 index 0000000000000..d3baf13ab84ab --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsGetSamples.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.compute.generated; + +/** + * Samples for GalleryInVMAccessControlProfileVersions Get. + */ +public final class GalleryInVMAccessControlProfileVersionsGetSamples { + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ + * galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Get.json + */ + /** + * Sample code: Get a gallery inVMAccessControlProfile version. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + getAGalleryInVMAccessControlProfileVersion(com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryInVMAccessControlProfileVersions() + .getWithResponse("myResourceGroup", "myGalleryName", "myInVMAccessControlProfileName", "1.0.0", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileSamples.java new file mode 100644 index 0000000000000..c87cd340a1a53 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileSamples.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.compute.generated; + +/** + * Samples for GalleryInVMAccessControlProfileVersions ListByGalleryInVMAccessControlProfile. + */ +public final class GalleryInVMAccessControlProfileVersionsListByGalleryInVMAccessControlProfileSamples { + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ + * galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_ListByGalleryInVMAccessControlProfile.json + */ + /** + * Sample code: List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void listGalleryInVMAccessControlProfileVersionsInAGalleryInVMAccessControlProfile( + com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryInVMAccessControlProfileVersions() + .listByGalleryInVMAccessControlProfile("myResourceGroup", "myGalleryName", "myInVMAccessControlProfileName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsUpdateSamples.java new file mode 100644 index 0000000000000..d31503e11995f --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfileVersionsUpdateSamples.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.compute.generated; + +import com.azure.resourcemanager.compute.models.AccessControlRulesMode; +import com.azure.resourcemanager.compute.models.EndpointAccess; +import com.azure.resourcemanager.compute.models.GalleryInVMAccessControlProfileVersionUpdate; +import com.azure.resourcemanager.compute.models.TargetRegion; +import java.util.Arrays; + +/** + * Samples for GalleryInVMAccessControlProfileVersions Update. + */ +public final class GalleryInVMAccessControlProfileVersionsUpdateSamples { + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ + * galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Update.json + */ + /** + * Sample code: Update a Gallery InVMAccessControlProfile Version. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + updateAGalleryInVMAccessControlProfileVersion(com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryInVMAccessControlProfileVersions() + .update("myResourceGroup", "myGalleryName", "myInVMAccessControlProfileName", "1.0.0", + new GalleryInVMAccessControlProfileVersionUpdate().withMode(AccessControlRulesMode.AUDIT) + .withDefaultAccess(EndpointAccess.ALLOW) + .withTargetLocations(Arrays.asList(new TargetRegion().withName("West US"), + new TargetRegion().withName("South Central US"), new TargetRegion().withName("East US"))) + .withExcludeFromLatest(false), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..675078aa9549b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesCreateOrUpdateSamples.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.compute.generated; + +import com.azure.resourcemanager.compute.fluent.models.GalleryInVMAccessControlProfileInner; +import com.azure.resourcemanager.compute.models.EndpointTypes; +import com.azure.resourcemanager.compute.models.GalleryInVMAccessControlProfileProperties; +import com.azure.resourcemanager.compute.models.OperatingSystemTypes; + +/** + * Samples for GalleryInVMAccessControlProfiles CreateOrUpdate. + */ +public final class GalleryInVMAccessControlProfilesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ + * galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Create.json + */ + /** + * Sample code: Create or update a gallery inVMAccessControlProfile. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + createOrUpdateAGalleryInVMAccessControlProfile(com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryInVMAccessControlProfiles() + .createOrUpdate("myResourceGroup", "myGalleryName", "myInVMAccessControlProfileName", + new GalleryInVMAccessControlProfileInner().withLocation("West US") + .withProperties( + new GalleryInVMAccessControlProfileProperties().withOsType(OperatingSystemTypes.LINUX) + .withApplicableHostEndpoint(EndpointTypes.WIRE_SERVER)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesDeleteSamples.java new file mode 100644 index 0000000000000..733e2fa726177 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesDeleteSamples.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.compute.generated; + +/** + * Samples for GalleryInVMAccessControlProfiles Delete. + */ +public final class GalleryInVMAccessControlProfilesDeleteSamples { + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ + * galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Delete.json + */ + /** + * Sample code: Delete a gallery inVMAccessControlProfile. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void deleteAGalleryInVMAccessControlProfile(com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryInVMAccessControlProfiles() + .delete("myResourceGroup", "myGalleryName", "myInVMAccessControlProfileName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesGetSamples.java new file mode 100644 index 0000000000000..f7fcabd7b9717 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesGetSamples.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.compute.generated; + +/** + * Samples for GalleryInVMAccessControlProfiles Get. + */ +public final class GalleryInVMAccessControlProfilesGetSamples { + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ + * galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Get.json + */ + /** + * Sample code: Get a gallery inVMAccessControlProfile. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void getAGalleryInVMAccessControlProfile(com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryInVMAccessControlProfiles() + .getWithResponse("myResourceGroup", "myGalleryName", "myInVMAccessControlProfileName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesListByGallerySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesListByGallerySamples.java new file mode 100644 index 0000000000000..776b96279545b --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesListByGallerySamples.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.compute.generated; + +/** + * Samples for GalleryInVMAccessControlProfiles ListByGallery. + */ +public final class GalleryInVMAccessControlProfilesListByGallerySamples { + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ + * galleryResourceProfileExamples/GalleryInVMAccessControlProfile_ListByGallery.json + */ + /** + * Sample code: List gallery inVMAccessControlProfiles in a gallery. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + listGalleryInVMAccessControlProfilesInAGallery(com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryInVMAccessControlProfiles() + .listByGallery("myResourceGroup", "myGalleryName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesUpdateSamples.java new file mode 100644 index 0000000000000..4c72185e7f41d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GalleryInVMAccessControlProfilesUpdateSamples.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.compute.generated; + +import com.azure.resourcemanager.compute.models.EndpointTypes; +import com.azure.resourcemanager.compute.models.GalleryInVMAccessControlProfileProperties; +import com.azure.resourcemanager.compute.models.GalleryInVMAccessControlProfileUpdate; +import com.azure.resourcemanager.compute.models.OperatingSystemTypes; + +/** + * Samples for GalleryInVMAccessControlProfiles Update. + */ +public final class GalleryInVMAccessControlProfilesUpdateSamples { + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ + * galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Update.json + */ + /** + * Sample code: Update a gallery inVMAccessControlProfile. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void updateAGalleryInVMAccessControlProfile(com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getGalleryInVMAccessControlProfiles() + .update("myResourceGroup", "myGalleryName", "myInVMAccessControlProfileName", + new GalleryInVMAccessControlProfileUpdate().withProperties( + new GalleryInVMAccessControlProfileProperties().withOsType(OperatingSystemTypes.LINUX) + .withApplicableHostEndpoint(EndpointTypes.WIRE_SERVER)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GallerySharingProfileUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GallerySharingProfileUpdateSamples.java index 3545f8697d972..72f3173a1c11d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GallerySharingProfileUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/GallerySharingProfileUpdateSamples.java @@ -16,7 +16,7 @@ public final class GallerySharingProfileUpdateSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * Gallery_EnableCommunityGallery.json */ /** @@ -36,7 +36,7 @@ public static void shareAGalleryToCommunity(com.azure.resourcemanager.AzureResou /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * Gallery_ResetSharingProfile.json */ /** @@ -56,7 +56,7 @@ public static void resetSharingProfileOfAGallery(com.azure.resourcemanager.Azure /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ * Gallery_AddToSharingProfile.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleriesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleriesGetSamples.java index fa3b10e703e48..69f6c8a258d9e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleriesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleriesGetSamples.java @@ -10,7 +10,7 @@ public final class SharedGalleriesGetSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ * sharedGalleryExamples/SharedGallery_Get.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleriesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleriesListSamples.java index c059323403cf0..1d30148421084 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleriesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleriesListSamples.java @@ -10,7 +10,7 @@ public final class SharedGalleriesListSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ * sharedGalleryExamples/SharedGallery_List.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImageVersionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImageVersionsGetSamples.java index 9dfdc7cfd1799..b7701214adf7c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImageVersionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImageVersionsGetSamples.java @@ -10,7 +10,7 @@ public final class SharedGalleryImageVersionsGetSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ * sharedGalleryExamples/SharedGalleryImageVersion_Get.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImageVersionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImageVersionsListSamples.java index 224143f877c4c..4bc0c2f3d4228 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImageVersionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImageVersionsListSamples.java @@ -10,7 +10,7 @@ public final class SharedGalleryImageVersionsListSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ * sharedGalleryExamples/SharedGalleryImageVersions_List.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImagesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImagesGetSamples.java index 8d4b7ef393071..6032d81f27906 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImagesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImagesGetSamples.java @@ -10,7 +10,7 @@ public final class SharedGalleryImagesGetSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ * sharedGalleryExamples/SharedGalleryImage_Get.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImagesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImagesListSamples.java index ef5f8c0bbd856..18a4a02a59af3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImagesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SharedGalleryImagesListSamples.java @@ -10,7 +10,7 @@ public final class SharedGalleryImagesListSamples { /* * x-ms-original-file: - * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/ + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/ * sharedGalleryExamples/SharedGalleryImages_List.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SoftDeletedResourceListByArtifactNameSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SoftDeletedResourceListByArtifactNameSamples.java new file mode 100644 index 0000000000000..48f2b93f0147a --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/SoftDeletedResourceListByArtifactNameSamples.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.compute.generated; + +/** + * Samples for SoftDeletedResource ListByArtifactName. + */ +public final class SoftDeletedResourceListByArtifactNameSamples { + /* + * x-ms-original-file: + * specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/ + * GallerySoftDeletedResource_ListByArtifactName.json + */ + /** + * Sample code: List soft-deleted resources of an artifact in the gallery. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void + listSoftDeletedResourcesOfAnArtifactInTheGallery(com.azure.resourcemanager.AzureResourceManager azure) { + azure.virtualMachines() + .manager() + .serviceClient() + .getSoftDeletedResources() + .listByArtifactName("myResourceGroup", "myGalleryName", "images", "myGalleryImageName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetVMsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetVMsUpdateSamples.java index cd6bd1b0dac8e..0f6e801316097 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetVMsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetVMsUpdateSamples.java @@ -37,9 +37,9 @@ import com.azure.resourcemanager.compute.models.NetworkApiVersion; import com.azure.resourcemanager.compute.models.NetworkInterfaceReference; import com.azure.resourcemanager.compute.models.NetworkProfile; -import com.azure.resourcemanager.compute.models.OperatingSystemTypes; import com.azure.resourcemanager.compute.models.OSDisk; import com.azure.resourcemanager.compute.models.OSProfile; +import com.azure.resourcemanager.compute.models.OperatingSystemTypes; import com.azure.resourcemanager.compute.models.PassNames; import com.azure.resourcemanager.compute.models.PatchSettings; import com.azure.resourcemanager.compute.models.Plan; @@ -56,6 +56,7 @@ import com.azure.resourcemanager.compute.models.StorageAccountTypes; import com.azure.resourcemanager.compute.models.StorageProfile; import com.azure.resourcemanager.compute.models.UefiSettings; +import com.azure.resourcemanager.compute.models.VMSizeProperties; import com.azure.resourcemanager.compute.models.VirtualHardDisk; import com.azure.resourcemanager.compute.models.VirtualMachineIpTag; import com.azure.resourcemanager.compute.models.VirtualMachineNetworkInterfaceConfiguration; @@ -72,12 +73,11 @@ import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMNetworkProfileConfiguration; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMProtectionPolicy; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; -import com.azure.resourcemanager.compute.models.VMSizeProperties; +import com.azure.resourcemanager.compute.models.WinRMConfiguration; +import com.azure.resourcemanager.compute.models.WinRMListener; import com.azure.resourcemanager.compute.models.WindowsConfiguration; import com.azure.resourcemanager.compute.models.WindowsPatchAssessmentMode; import com.azure.resourcemanager.compute.models.WindowsVMGuestPatchMode; -import com.azure.resourcemanager.compute.models.WinRMConfiguration; -import com.azure.resourcemanager.compute.models.WinRMListener; import java.util.Arrays; import java.util.HashMap; import java.util.Map; diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetsCreateOrUpdateSamples.java index dbe1db8c066aa..dc71e0e2df632 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetsCreateOrUpdateSamples.java @@ -31,10 +31,11 @@ import com.azure.resourcemanager.compute.models.KeyVaultSecretReference; import com.azure.resourcemanager.compute.models.LinuxConfiguration; import com.azure.resourcemanager.compute.models.Mode; +import com.azure.resourcemanager.compute.models.NetworkApiVersion; import com.azure.resourcemanager.compute.models.NetworkInterfaceAuxiliaryMode; import com.azure.resourcemanager.compute.models.NetworkInterfaceAuxiliarySku; -import com.azure.resourcemanager.compute.models.OrchestrationMode; import com.azure.resourcemanager.compute.models.OSImageNotificationProfile; +import com.azure.resourcemanager.compute.models.OrchestrationMode; import com.azure.resourcemanager.compute.models.Plan; import com.azure.resourcemanager.compute.models.PriorityMixPolicy; import com.azure.resourcemanager.compute.models.ProxyAgentSettings; @@ -63,6 +64,9 @@ import com.azure.resourcemanager.compute.models.UpgradePolicy; import com.azure.resourcemanager.compute.models.UserInitiatedReboot; import com.azure.resourcemanager.compute.models.UserInitiatedRedeploy; +import com.azure.resourcemanager.compute.models.VMDiskSecurityProfile; +import com.azure.resourcemanager.compute.models.VMGalleryApplication; +import com.azure.resourcemanager.compute.models.VMSizeProperties; import com.azure.resourcemanager.compute.models.VirtualHardDisk; import com.azure.resourcemanager.compute.models.VirtualMachineEvictionPolicyTypes; import com.azure.resourcemanager.compute.models.VirtualMachinePriorityTypes; @@ -80,9 +84,6 @@ import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetScaleInRules; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetStorageProfile; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMProfile; -import com.azure.resourcemanager.compute.models.VMDiskSecurityProfile; -import com.azure.resourcemanager.compute.models.VMGalleryApplication; -import com.azure.resourcemanager.compute.models.VMSizeProperties; import com.azure.resourcemanager.compute.models.ZonalPlatformFaultDomainAlignMode; import java.io.IOException; import java.util.Arrays; @@ -2159,36 +2160,43 @@ public static void createAScaleSetWithPriorityMixPolicy(com.azure.resourcemanage .getVirtualMachineScaleSets() .createOrUpdate("myResourceGroup", "{vmss-name}", new VirtualMachineScaleSetInner().withLocation("westus") - .withSku(new Sku().withName("Standard_A8m_v2").withTier("Standard").withCapacity(10L)) + .withSku(new Sku().withName("Standard_A8m_v2").withTier("Standard").withCapacity(2L)) .withVirtualMachineProfile(new VirtualMachineScaleSetVMProfile() .withOsProfile(new VirtualMachineScaleSetOSProfile().withComputerNamePrefix("{vmss-name}") .withAdminUsername("{your-username}") .withAdminPassword("fakeTokenPlaceholder")) .withStorageProfile(new VirtualMachineScaleSetStorageProfile() - .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer") - .withOffer("WindowsServer") - .withSku("2016-Datacenter") + .withImageReference(new ImageReference().withPublisher("Canonical") + .withOffer("0001-com-ubuntu-server-focal") + .withSku("20_04-lts-gen2") .withVersion("latest")) .withOsDisk(new VirtualMachineScaleSetOSDisk() .withCaching(CachingTypes.READ_WRITE) .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) .withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters() .withStorageAccountType(StorageAccountTypes.STANDARD_LRS)))) - .withNetworkProfile( - new VirtualMachineScaleSetNetworkProfile().withNetworkInterfaceConfigurations( + .withNetworkProfile(new VirtualMachineScaleSetNetworkProfile() + .withNetworkInterfaceConfigurations( Arrays.asList(new VirtualMachineScaleSetNetworkConfiguration().withName("{vmss-name}") .withPrimary(true) + .withEnableAcceleratedNetworking(false) .withIpConfigurations(Arrays.asList(new VirtualMachineScaleSetIpConfiguration() .withName("{vmss-name}") .withSubnet(new ApiEntityReference().withId( - "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")))) - .withEnableIpForwarding(true)))) - .withPriority(VirtualMachinePriorityTypes.SPOT) - .withEvictionPolicy(VirtualMachineEvictionPolicyTypes.DEALLOCATE) - .withBillingProfile(new BillingProfile().withMaxPrice(-1.0D))) - .withSinglePlacementGroup(false) + "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")) + .withPrimary(true) + .withPublicIpAddressConfiguration( + new VirtualMachineScaleSetPublicIpAddressConfiguration() + .withName("{vmss-name}") + .withIdleTimeoutInMinutes(15)) + .withApplicationGatewayBackendAddressPools(Arrays.asList()) + .withLoadBalancerBackendAddressPools(Arrays.asList()))) + .withEnableIpForwarding(true))) + .withNetworkApiVersion(NetworkApiVersion.TWO_ZERO_TWO_ZERO_ONE_ONE_ZERO_ONE)) + .withPriority(VirtualMachinePriorityTypes.SPOT)) + .withPlatformFaultDomainCount(1) .withOrchestrationMode(OrchestrationMode.FLEXIBLE) - .withPriorityMixPolicy(new PriorityMixPolicy().withBaseRegularPriorityCount(4) + .withPriorityMixPolicy(new PriorityMixPolicy().withBaseRegularPriorityCount(10) .withRegularPriorityPercentageAboveBase(50)), null, null, com.azure.core.util.Context.NONE); } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetsUpdateSamples.java index c534d353f0261..3848988ed1439 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetsUpdateSamples.java @@ -70,13 +70,13 @@ import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetUpdatePublicIpAddressConfiguration; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetUpdateStorageProfile; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetUpdateVMProfile; +import com.azure.resourcemanager.compute.models.WinRMConfiguration; +import com.azure.resourcemanager.compute.models.WinRMListener; import com.azure.resourcemanager.compute.models.WindowsConfiguration; import com.azure.resourcemanager.compute.models.WindowsPatchAssessmentMode; import com.azure.resourcemanager.compute.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting; import com.azure.resourcemanager.compute.models.WindowsVMGuestPatchAutomaticByPlatformSettings; import com.azure.resourcemanager.compute.models.WindowsVMGuestPatchMode; -import com.azure.resourcemanager.compute.models.WinRMConfiguration; -import com.azure.resourcemanager.compute.models.WinRMListener; import java.io.IOException; import java.util.Arrays; import java.util.HashMap; diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesCreateOrUpdateSamples.java index a49a48f8ce14d..c20eab61dfd26 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesCreateOrUpdateSamples.java @@ -37,10 +37,10 @@ import com.azure.resourcemanager.compute.models.NetworkApiVersion; import com.azure.resourcemanager.compute.models.NetworkInterfaceReference; import com.azure.resourcemanager.compute.models.NetworkProfile; -import com.azure.resourcemanager.compute.models.OperatingSystemTypes; import com.azure.resourcemanager.compute.models.OSDisk; import com.azure.resourcemanager.compute.models.OSImageNotificationProfile; import com.azure.resourcemanager.compute.models.OSProfile; +import com.azure.resourcemanager.compute.models.OperatingSystemTypes; import com.azure.resourcemanager.compute.models.PatchSettings; import com.azure.resourcemanager.compute.models.Plan; import com.azure.resourcemanager.compute.models.ProxyAgentSettings; @@ -63,6 +63,9 @@ import com.azure.resourcemanager.compute.models.UefiSettings; import com.azure.resourcemanager.compute.models.UserInitiatedReboot; import com.azure.resourcemanager.compute.models.UserInitiatedRedeploy; +import com.azure.resourcemanager.compute.models.VMDiskSecurityProfile; +import com.azure.resourcemanager.compute.models.VMGalleryApplication; +import com.azure.resourcemanager.compute.models.VMSizeProperties; import com.azure.resourcemanager.compute.models.VirtualHardDisk; import com.azure.resourcemanager.compute.models.VirtualMachineIdentity; import com.azure.resourcemanager.compute.models.VirtualMachineIdentityUserAssignedIdentities; @@ -71,9 +74,6 @@ import com.azure.resourcemanager.compute.models.VirtualMachinePublicIpAddressConfiguration; import com.azure.resourcemanager.compute.models.VirtualMachinePublicIpAddressDnsSettingsConfiguration; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; -import com.azure.resourcemanager.compute.models.VMDiskSecurityProfile; -import com.azure.resourcemanager.compute.models.VMGalleryApplication; -import com.azure.resourcemanager.compute.models.VMSizeProperties; import com.azure.resourcemanager.compute.models.WindowsConfiguration; import com.azure.resourcemanager.compute.models.WindowsPatchAssessmentMode; import com.azure.resourcemanager.compute.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting; diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesInstallPatchesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesInstallPatchesSamples.java index 03c7b404a5030..6e76c1a28d73a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesInstallPatchesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesInstallPatchesSamples.java @@ -4,9 +4,9 @@ package com.azure.resourcemanager.compute.generated; -import com.azure.resourcemanager.compute.models.VirtualMachineInstallPatchesParameters; import com.azure.resourcemanager.compute.models.VMGuestPatchClassificationWindows; import com.azure.resourcemanager.compute.models.VMGuestPatchRebootSetting; +import com.azure.resourcemanager.compute.models.VirtualMachineInstallPatchesParameters; import com.azure.resourcemanager.compute.models.WindowsParameters; import java.time.OffsetDateTime; import java.util.Arrays;