From 3c0a3ec2dce2f1fa02999014d00e0d6693d6abbe Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 27 Jan 2026 18:42:52 +0000 Subject: [PATCH 1/4] Configurations: 'specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/tspconfig.yaml', API Version: 2025-07-01, SDK Release Type: stable, and CommitSHA: '652ad4cb131256f10a90ea2df207b38cf35d6671' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5803514 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 281 +- .../README.md | 4 +- .../SAMPLE.md | 804 +++- .../pom.xml | 6 +- .../DeploymentStacksManager.java | 58 +- .../fluent/DeploymentStacksClient.java | 635 +-- .../DeploymentStacksManagementClient.java | 41 +- ...WhatIfResultsAtManagementGroupsClient.java | 237 + ...ksWhatIfResultsAtResourceGroupsClient.java | 238 + ...cksWhatIfResultsAtSubscriptionsClient.java | 220 + .../fluent/models/DeploymentStackInner.java | 562 ++- .../models/DeploymentStackProperties.java | 361 +- ...eploymentStackTemplateDefinitionInner.java | 28 +- .../DeploymentStackValidateResultInner.java | 121 +- .../DeploymentStacksWhatIfResultInner.java | 218 + .../fluent/models/package-info.java | 5 +- .../deploymentstacks/fluent/package-info.java | 5 +- .../implementation/DeploymentStackImpl.java | 277 +- ...DeploymentStackTemplateDefinitionImpl.java | 14 +- .../DeploymentStackValidateResultImpl.java | 10 +- .../DeploymentStacksClientImpl.java | 3854 +++++++---------- .../implementation/DeploymentStacksImpl.java | 305 +- ...ploymentStacksManagementClientBuilder.java | 28 +- .../DeploymentStacksManagementClientImpl.java | 97 +- .../DeploymentStacksWhatIfResultImpl.java | 177 + ...IfResultsAtManagementGroupsClientImpl.java | 881 ++++ ...ksWhatIfResultsAtManagementGroupsImpl.java | 135 + ...atIfResultsAtResourceGroupsClientImpl.java | 903 ++++ ...acksWhatIfResultsAtResourceGroupsImpl.java | 194 + ...hatIfResultsAtSubscriptionsClientImpl.java | 831 ++++ ...tacksWhatIfResultsAtSubscriptionsImpl.java | 131 + .../implementation/ResourceManagerUtils.java | 2 +- .../models/DeploymentStackListResult.java | 27 +- ...eploymentStacksWhatIfResultListResult.java | 98 + .../implementation/package-info.java | 5 +- .../models/ActionOnUnmanage.java | 38 +- .../models/AzureResourceBase.java | 145 - .../deploymentstacks/models/DenySettings.java | 17 +- .../models/DenySettingsMode.java | 8 +- .../models/DenyStatusMode.java | 19 +- .../models/DeploymentExtension.java | 128 + .../models/DeploymentExtensionConfig.java | 98 + .../models/DeploymentExtensionConfigItem.java | 136 + .../models/DeploymentExternalInput.java | 89 + .../DeploymentExternalInputDefinition.java | 120 + .../models/DeploymentParameter.java | 44 +- .../models/DeploymentStack.java | 732 +++- .../DeploymentStackProvisioningState.java | 34 +- .../DeploymentStackTemplateDefinition.java | 6 +- .../DeploymentStackValidateProperties.java | 144 +- .../models/DeploymentStackValidateResult.java | 20 +- .../models/DeploymentStacks.java | 376 +- .../models/DeploymentStacksChangeBase.java | 91 + ...loymentStacksChangeBaseDenyStatusMode.java | 95 + ...eBaseDeploymentStacksManagementStatus.java | 97 + ...ploymentStacksChangeDeltaDenySettings.java | 113 + .../DeploymentStacksChangeDeltaRecord.java | 120 + .../models/DeploymentStacksDebugSetting.java | 10 +- .../DeploymentStacksDeleteDetachEnum.java | 6 +- .../models/DeploymentStacksDiagnostic.java | 148 + .../DeploymentStacksDiagnosticLevel.java | 56 + .../DeploymentStacksManagementStatus.java | 56 + .../DeploymentStacksParametersLink.java | 18 +- ...acksResourcesWithoutDeleteSupportEnum.java | 52 + .../models/DeploymentStacksTemplateLink.java | 10 +- .../models/DeploymentStacksWhatIfChange.java | 115 + ...DeploymentStacksWhatIfChangeCertainty.java | 52 + .../DeploymentStacksWhatIfChangeType.java | 76 + .../DeploymentStacksWhatIfPropertyChange.java | 158 + ...loymentStacksWhatIfPropertyChangeType.java | 70 + .../DeploymentStacksWhatIfResourceChange.java | 287 ++ .../models/DeploymentStacksWhatIfResult.java | 290 ++ ...eploymentStacksWhatIfResultProperties.java | 666 +++ ...StacksWhatIfResultsAtManagementGroups.java | 159 + ...ntStacksWhatIfResultsAtResourceGroups.java | 195 + ...entStacksWhatIfResultsAtSubscriptions.java | 146 + .../models/ErrorAdditionalInfo.java | 91 + .../models/KeyVaultParameterReference.java | 25 +- .../models/KeyVaultReference.java | 17 +- .../models/ManagedResourceReference.java | 97 +- .../models/ResourceReference.java | 120 +- .../models/ResourceReferenceExtended.java | 104 +- .../models/ResourceStatusMode.java | 9 +- .../UnmanageActionManagementGroupMode.java | 51 - .../UnmanageActionResourceGroupMode.java | 51 - .../models/UnmanageActionResourceMode.java | 51 - .../models/ValidationLevel.java | 58 + .../deploymentstacks/models/package-info.java | 5 +- .../deploymentstacks/package-info.java | 5 +- .../src/main/java/module-info.java | 3 +- ...s-deploymentstacks_apiview_properties.json | 118 + ...r-resources-deploymentstacks_metadata.json | 1 + .../proxy-config.json | 2 +- .../reflect-config.json | 2 +- ...reateOrUpdateAtManagementGroupSamples.java | 36 +- ...sCreateOrUpdateAtResourceGroupSamples.java | 43 +- ...ksCreateOrUpdateAtSubscriptionSamples.java | 35 +- ...tStacksDeleteAtManagementGroupSamples.java | 12 +- ...mentStacksDeleteAtSubscriptionSamples.java | 13 +- .../DeploymentStacksDeleteSamples.java | 12 +- ...xportTemplateAtManagementGroupSamples.java | 10 +- ...sExportTemplateAtResourceGroupSamples.java | 10 +- ...ksExportTemplateAtSubscriptionSamples.java | 10 +- ...mentStacksGetAtManagementGroupSamples.java | 10 +- ...loymentStacksGetAtSubscriptionSamples.java | 10 +- ...oymentStacksGetByResourceGroupSamples.java | 10 +- ...entStacksListAtManagementGroupSamples.java | 10 +- ...ymentStacksListByResourceGroupSamples.java | 10 +- .../DeploymentStacksListSamples.java | 10 +- ...ValidateStackAtManagementGroupSamples.java | 26 +- ...ksValidateStackAtResourceGroupSamples.java | 24 +- ...cksValidateStackAtSubscriptionSamples.java | 25 +- ...tManagementGroupCreateOrUpdateSamples.java | 74 + ...ResultsAtManagementGroupDeleteSamples.java | 25 + ...tIfResultsAtManagementGroupGetSamples.java | 24 + ...IfResultsAtManagementGroupListSamples.java | 23 + ...ResultsAtManagementGroupWhatIfSamples.java | 24 + ...sAtResourceGroupCreateOrUpdateSamples.java | 74 + ...IfResultsAtResourceGroupDeleteSamples.java | 25 + ...esourceGroupGetByResourceGroupSamples.java | 25 + ...sourceGroupListByResourceGroupSamples.java | 24 + ...IfResultsAtResourceGroupWhatIfSamples.java | 24 + ...tsAtSubscriptionCreateOrUpdateSamples.java | 74 + ...tIfResultsAtSubscriptionDeleteSamples.java | 25 + ...WhatIfResultsAtSubscriptionGetSamples.java | 24 + ...hatIfResultsAtSubscriptionListSamples.java | 23 + ...tIfResultsAtSubscriptionWhatIfSamples.java | 24 + .../generated/ActionOnUnmanageTests.java | 39 + .../generated/DenySettingsTests.java | 37 + ...eploymentExternalInputDefinitionTests.java | 25 + .../DeploymentExternalInputTests.java | 21 + ...mentStackTemplateDefinitionInnerTests.java | 23 + ...ntStacksChangeBaseDenyStatusModeTests.java | 21 + ...DeploymentStacksManagementStatusTests.java | 21 + .../DeploymentStacksChangeBaseTests.java | 19 + ...entStacksChangeDeltaDenySettingsTests.java | 36 + ...eploymentStacksChangeDeltaRecordTests.java | 27 + .../DeploymentStacksDebugSettingTests.java | 25 + ...tacksDeleteAtManagementGroupMockTests.java | 13 +- ...ntStacksDeleteAtSubscriptionMockTests.java | 12 +- .../DeploymentStacksDeleteMockTests.java | 13 +- ...tManagementGroupWithResponseMockTests.java | 16 +- ...eAtResourceGroupWithResponseMockTests.java | 16 +- ...teAtSubscriptionWithResponseMockTests.java | 16 +- .../DeploymentStacksParametersLinkTests.java | 29 + .../DeploymentStacksTemplateLinkTests.java | 38 + .../DeploymentStacksWhatIfChangeTests.java | 72 + ...oymentStacksWhatIfPropertyChangeTests.java | 29 + ...mentGroupsDeleteWithResponseMockTests.java | 38 + ...urceGroupsDeleteWithResponseMockTests.java | 38 + ...scriptionsDeleteWithResponseMockTests.java | 38 + .../generated/ErrorAdditionalInfoTests.java | 16 + .../generated/KeyVaultReferenceTests.java | 24 + .../tsp-location.yaml | 4 + .../CHANGELOG.md | 2 +- .../azure-resourcemanager-resources/README.md | 2 +- 157 files changed, 15059 insertions(+), 4324 deletions(-) create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtManagementGroupsClient.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtResourceGroupsClient.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtSubscriptionsClient.java rename sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/{ => fluent}/models/DeploymentStackProperties.java (72%) create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStacksWhatIfResultInner.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultImpl.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsClientImpl.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsImpl.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsClientImpl.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsImpl.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsClientImpl.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsImpl.java rename sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/{ => implementation}/models/DeploymentStackListResult.java (80%) create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/models/DeploymentStacksWhatIfResultListResult.java delete mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/AzureResourceBase.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtension.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfig.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfigItem.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInput.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInputDefinition.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBase.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDenyStatusMode.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDeploymentStacksManagementStatus.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaDenySettings.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaRecord.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnostic.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnosticLevel.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksManagementStatus.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksResourcesWithoutDeleteSupportEnum.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChange.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeCertainty.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeType.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChange.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChangeType.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResourceChange.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResult.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultProperties.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtManagementGroups.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtResourceGroups.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtSubscriptions.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ErrorAdditionalInfo.java delete mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/UnmanageActionManagementGroupMode.java delete mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/UnmanageActionResourceGroupMode.java delete mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/UnmanageActionResourceMode.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ValidationLevel.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_apiview_properties.json create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_metadata.json create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupCreateOrUpdateSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupDeleteSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupGetSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupListSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupWhatIfSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupCreateOrUpdateSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupDeleteSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupGetByResourceGroupSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupListByResourceGroupSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupWhatIfSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionCreateOrUpdateSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionDeleteSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionGetSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionListSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionWhatIfSamples.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ActionOnUnmanageTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DenySettingsTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputDefinitionTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStackTemplateDefinitionInnerTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseDenyStatusModeTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseDeploymentStacksManagementStatusTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaDenySettingsTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaRecordTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDebugSettingTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksParametersLinkTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksTemplateLinkTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfChangeTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfPropertyChangeTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupsDeleteWithResponseMockTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupsDeleteWithResponseMockTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionsDeleteWithResponseMockTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ErrorAdditionalInfoTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/KeyVaultReferenceTests.java create mode 100644 sdk/resources/azure-resourcemanager-resources-deploymentstacks/tsp-location.yaml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 506d0f66af47..d73b7d15f863 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -505,7 +505,7 @@ com.azure.resourcemanager:azure-resourcemanager-kubernetesconfiguration-fluxconf com.azure.resourcemanager:azure-resourcemanager-kubernetesconfiguration-extensions;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-kubernetesconfiguration-extensiontypes;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-cloudhealth;1.0.0-beta.1;1.0.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-resources-deploymentstacks;1.0.0;1.1.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-resources-deploymentstacks;1.0.0;1.1.0 com.azure.resourcemanager:azure-resourcemanager-kubernetesconfiguration-privatelinkscopes;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-resources-bicep;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-playwright;1.0.0;1.1.0-beta.1 diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/CHANGELOG.md b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/CHANGELOG.md index 05dea1e149b7..c2d233f5f936 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/CHANGELOG.md +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/CHANGELOG.md @@ -1,14 +1,287 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0 (2026-01-27) -### Features Added +- Azure Resource Manager Deployment Stacks client library for Java. This package contains Microsoft Azure SDK for Deployment Stacks Management SDK. The APIs listed in this specification can be used to manage Deployment stack resources through the Azure Resource Manager. Package api-version 2025-07-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.UnmanageActionResourceGroupMode` was removed + +#### `models.DeploymentStackListResult` was removed + +#### `models.DeploymentStackProperties` was removed + +#### `models.UnmanageActionManagementGroupMode` was removed + +#### `models.AzureResourceBase` was removed + +#### `models.UnmanageActionResourceMode` was removed + +#### `models.DeploymentStacks` was modified + +* `deleteByIdWithResponse(java.lang.String,models.UnmanageActionResourceMode,models.UnmanageActionResourceGroupMode,models.UnmanageActionManagementGroupMode,java.lang.Boolean,com.azure.core.util.Context)` was removed +* `delete(java.lang.String,java.lang.String,models.UnmanageActionResourceMode,models.UnmanageActionResourceGroupMode,models.UnmanageActionManagementGroupMode,java.lang.Boolean,com.azure.core.util.Context)` was removed +* `deleteAtSubscription(java.lang.String,models.UnmanageActionResourceMode,models.UnmanageActionResourceGroupMode,models.UnmanageActionManagementGroupMode,java.lang.Boolean,com.azure.core.util.Context)` was removed +* `deleteAtManagementGroup(java.lang.String,java.lang.String,models.UnmanageActionResourceMode,models.UnmanageActionResourceGroupMode,models.UnmanageActionManagementGroupMode,java.lang.Boolean,com.azure.core.util.Context)` was removed + +#### `models.DeploymentStackTemplateDefinition` was modified + +* `java.lang.Object template()` -> `java.util.Map template()` + +#### `models.DeploymentStack$Definition` was modified + +* `withProperties(models.DeploymentStackProperties)` was removed + +#### `models.DeploymentStack` was modified + +* `properties()` was removed + +#### `models.ResourceReferenceExtended` was modified + +* `ResourceReferenceExtended()` was changed to private access +* `validate()` was removed +* `withError(com.azure.core.management.exception.ManagementError)` was removed + +#### `models.ManagedResourceReference` was modified + +* `ManagedResourceReference()` was changed to private access +* `validate()` was removed +* `withDenyStatus(models.DenyStatusMode)` was removed +* `withStatus(models.ResourceStatusMode)` was removed + +#### `models.KeyVaultReference` was modified + +* `validate()` was removed + +#### `models.DeploymentStack$Update` was modified + +* `withProperties(models.DeploymentStackProperties)` was removed + +#### `models.ActionOnUnmanage` was modified + +* `validate()` was removed + +#### `models.DenySettings` was modified + +* `validate()` was removed + +#### `models.DeploymentStacksTemplateLink` was modified + +* `validate()` was removed + +#### `models.DeploymentStackValidateProperties` was modified + +* `DeploymentStackValidateProperties()` was changed to private access +* `withValidatedResources(java.util.List)` was removed +* `withParameters(java.util.Map)` was removed +* `withTemplateLink(models.DeploymentStacksTemplateLink)` was removed +* `withActionOnUnmanage(models.ActionOnUnmanage)` was removed +* `withCorrelationId(java.lang.String)` was removed +* `validate()` was removed +* `withDeploymentScope(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed +* `withDenySettings(models.DenySettings)` was removed + +#### `models.DeploymentParameter` was modified + +* `java.lang.Object value()` -> `com.azure.core.util.BinaryData value()` +* `validate()` was removed +* `withValue(java.lang.Object)` was removed + +#### `models.DeploymentStacksDebugSetting` was modified + +* `validate()` was removed + +#### `models.KeyVaultParameterReference` was modified + +* `validate()` was removed + +#### `models.ResourceReference` was modified + +* `validate()` was removed + +#### `models.DeploymentStacksParametersLink` was modified + +* `validate()` was removed + +### Features Added + +* `models.DeploymentExternalInputDefinition` was added + +* `models.DeploymentStacksChangeBase` was added + +* `models.DeploymentStacksWhatIfResult` was added + +* `models.DeploymentStacksWhatIfResultProperties` was added + +* `models.DeploymentExtensionConfigItem` was added + +* `models.DeploymentStacksWhatIfResult$UpdateStages` was added + +* `models.DeploymentStacksChangeBaseDeploymentStacksManagementStatus` was added + +* `models.DeploymentStacksResourcesWithoutDeleteSupportEnum` was added + +* `models.DeploymentStacksChangeDeltaRecord` was added + +* `models.DeploymentStacksWhatIfPropertyChangeType` was added + +* `models.DeploymentStacksWhatIfResultsAtManagementGroups` was added + +* `models.DeploymentExtensionConfig` was added + +* `models.DeploymentExtension` was added + +* `models.DeploymentStacksWhatIfResultsAtSubscriptions` was added + +* `models.DeploymentStacksDiagnosticLevel` was added + +* `models.DeploymentStacksChangeDeltaDenySettings` was added + +* `models.DeploymentStacksWhatIfResourceChange` was added + +* `models.DeploymentStacksWhatIfResult$DefinitionStages` was added + +* `models.DeploymentStacksWhatIfResultsAtResourceGroups` was added + +* `models.DeploymentStacksManagementStatus` was added + +* `models.DeploymentExternalInput` was added + +* `models.ErrorAdditionalInfo` was added + +* `models.DeploymentStacksWhatIfResult$Update` was added + +* `models.DeploymentStacksChangeBaseDenyStatusMode` was added + +* `models.DeploymentStacksDiagnostic` was added + +* `models.ValidationLevel` was added + +* `models.DeploymentStacksWhatIfPropertyChange` was added + +* `models.DeploymentStacksWhatIfChangeCertainty` was added + +* `models.DeploymentStacksWhatIfResult$Definition` was added + +* `models.DeploymentStacksWhatIfChange` was added + +* `models.DeploymentStacksWhatIfChangeType` was added + +#### `models.DeploymentStacks` was modified + +* `deleteAtManagementGroup(java.lang.String,java.lang.String,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksResourcesWithoutDeleteSupportEnum,java.lang.Boolean,com.azure.core.util.Context)` was added +* `delete(java.lang.String,java.lang.String,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksResourcesWithoutDeleteSupportEnum,java.lang.Boolean,com.azure.core.util.Context)` was added +* `deleteByIdWithResponse(java.lang.String,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksResourcesWithoutDeleteSupportEnum,java.lang.Boolean,com.azure.core.util.Context)` was added +* `deleteAtSubscription(java.lang.String,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksResourcesWithoutDeleteSupportEnum,java.lang.Boolean,com.azure.core.util.Context)` was added + +#### `models.DeploymentStack$Definition` was modified + +* `withValidationLevel(models.ValidationLevel)` was added +* `withError(com.azure.core.management.exception.ManagementError)` was added +* `withTemplate(java.util.Map)` was added +* `withTemplateLink(models.DeploymentStacksTemplateLink)` was added +* `withActionOnUnmanage(models.ActionOnUnmanage)` was added +* `withDescription(java.lang.String)` was added +* `withExternalInputDefinitions(java.util.Map)` was added +* `withDeploymentScope(java.lang.String)` was added +* `withParameters(java.util.Map)` was added +* `withDebugSetting(models.DeploymentStacksDebugSetting)` was added +* `withBypassStackOutOfSyncError(java.lang.Boolean)` was added +* `withExternalInputs(java.util.Map)` was added +* `withExtensionConfigs(java.util.Map)` was added +* `withParametersLink(models.DeploymentStacksParametersLink)` was added +* `withDenySettings(models.DenySettings)` was added + +#### `models.DeploymentStack` was modified + +* `externalInputs()` was added +* `denySettings()` was added +* `bypassStackOutOfSyncError()` was added +* `extensionConfigs()` was added +* `deploymentId()` was added +* `debugSetting()` was added +* `validationLevel()` was added +* `provisioningState()` was added +* `failedResources()` was added +* `template()` was added +* `deploymentScope()` was added +* `deploymentExtensions()` was added +* `outputs()` was added +* `parameters()` was added +* `correlationId()` was added +* `description()` was added +* `templateLink()` was added +* `detachedResources()` was added +* `actionOnUnmanage()` was added +* `parametersLink()` was added +* `error()` was added +* `duration()` was added +* `externalInputDefinitions()` was added +* `deletedResources()` was added +* `resources()` was added + +#### `models.ResourceReferenceExtended` was modified + +* `identifiers()` was added +* `type()` was added +* `apiVersion()` was added +* `extension()` was added + +#### `DeploymentStacksManager` was modified + +* `deploymentStacksWhatIfResultsAtManagementGroups()` was added +* `deploymentStacksWhatIfResultsAtResourceGroups()` was added +* `deploymentStacksWhatIfResultsAtSubscriptions()` was added + +#### `models.ManagedResourceReference` was modified + +* `extension()` was added +* `type()` was added +* `identifiers()` was added +* `apiVersion()` was added + +#### `models.DeploymentStack$Update` was modified + +* `withParameters(java.util.Map)` was added +* `withDenySettings(models.DenySettings)` was added +* `withDeploymentScope(java.lang.String)` was added +* `withExternalInputDefinitions(java.util.Map)` was added +* `withParametersLink(models.DeploymentStacksParametersLink)` was added +* `withError(com.azure.core.management.exception.ManagementError)` was added +* `withTemplate(java.util.Map)` was added +* `withTemplateLink(models.DeploymentStacksTemplateLink)` was added +* `withActionOnUnmanage(models.ActionOnUnmanage)` was added +* `withBypassStackOutOfSyncError(java.lang.Boolean)` was added +* `withDescription(java.lang.String)` was added +* `withValidationLevel(models.ValidationLevel)` was added +* `withExternalInputs(java.util.Map)` was added +* `withExtensionConfigs(java.util.Map)` was added +* `withDebugSetting(models.DeploymentStacksDebugSetting)` was added + +#### `models.ActionOnUnmanage` was modified + +* `withResourcesWithoutDeleteSupport(models.DeploymentStacksResourcesWithoutDeleteSupportEnum)` was added +* `resourcesWithoutDeleteSupport()` was added + +#### `models.DeploymentStackValidateProperties` was modified + +* `validationLevel()` was added +* `deploymentExtensions()` was added + +#### `models.DeploymentParameter` was modified + +* `withValue(com.azure.core.util.BinaryData)` was added +* `withExpression(java.lang.String)` was added +* `expression()` was added + +#### `models.ResourceReference` was modified -### Other Changes +* `type()` was added +* `identifiers()` was added +* `extension()` was added +* `apiVersion()` was added ## 1.0.0 (2025-07-10) diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/README.md b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/README.md index 8faf3bdc7c54..bc5d3990e5e1 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/README.md +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Deployment Stacks client library for Java. -This package contains Microsoft Azure SDK for Deployment Stacks Management SDK. DeploymentStacks Client. Package tag package-2024-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Deployment Stacks Management SDK. The APIs listed in this specification can be used to manage Deployment stack resources through the Azure Resource Manager. Package api-version 2025-07-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-resources-deploymentstacks - 1.0.0 + 1.1.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/SAMPLE.md b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/SAMPLE.md index f648884e6d86..f2f04c3f9a5f 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/SAMPLE.md +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/SAMPLE.md @@ -21,16 +21,43 @@ - [ValidateStackAtManagementGroup](#deploymentstacks_validatestackatmanagementgroup) - [ValidateStackAtResourceGroup](#deploymentstacks_validatestackatresourcegroup) - [ValidateStackAtSubscription](#deploymentstacks_validatestackatsubscription) + +## DeploymentStacksWhatIfResultsAtManagementGroup + +- [CreateOrUpdate](#deploymentstackswhatifresultsatmanagementgroup_createorupdate) +- [Delete](#deploymentstackswhatifresultsatmanagementgroup_delete) +- [Get](#deploymentstackswhatifresultsatmanagementgroup_get) +- [List](#deploymentstackswhatifresultsatmanagementgroup_list) +- [WhatIf](#deploymentstackswhatifresultsatmanagementgroup_whatif) + +## DeploymentStacksWhatIfResultsAtResourceGroup + +- [CreateOrUpdate](#deploymentstackswhatifresultsatresourcegroup_createorupdate) +- [Delete](#deploymentstackswhatifresultsatresourcegroup_delete) +- [GetByResourceGroup](#deploymentstackswhatifresultsatresourcegroup_getbyresourcegroup) +- [ListByResourceGroup](#deploymentstackswhatifresultsatresourcegroup_listbyresourcegroup) +- [WhatIf](#deploymentstackswhatifresultsatresourcegroup_whatif) + +## DeploymentStacksWhatIfResultsAtSubscription + +- [CreateOrUpdate](#deploymentstackswhatifresultsatsubscription_createorupdate) +- [Delete](#deploymentstackswhatifresultsatsubscription_delete) +- [Get](#deploymentstackswhatifresultsatsubscription_get) +- [List](#deploymentstackswhatifresultsatsubscription_list) +- [WhatIf](#deploymentstackswhatifresultsatsubscription_whatif) ### DeploymentStacks_CreateOrUpdateAtManagementGroup ```java +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -40,30 +67,37 @@ import java.util.Map; */ public final class DeploymentStacksCreateOrUpdateAtManagementGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackManagementGroupCreate.json + * x-ms-original-file: 2025-07-01/DeploymentStackManagementGroupCreate.json */ /** - * Sample code: DeploymentStacksManagementGroupCreateOrUpdate. + * Sample code: Create or update a management group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksManagementGroupCreateOrUpdate( + public static void createOrUpdateAManagementGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .createOrUpdateAtManagementGroup("myMg", "simpleDeploymentStack", new DeploymentStackInner() - .withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withProperties(new DeploymentStackProperties() - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .createOrUpdateAtManagementGroup("myMg", "simpleDeploymentStack", + new DeploymentStackInner().withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .withParameters(mapOf("parameter1", + new DeploymentParameter() + .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) + .withExtensionConfigs( + mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", + new DeploymentExtensionConfigItem() + .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), + "configOne", + new DeploymentExtensionConfigItem().withValue( + BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false))), + .withApplyToChildScopes(false)), com.azure.core.util.Context.NONE); } @@ -84,12 +118,15 @@ public final class DeploymentStacksCreateOrUpdateAtManagementGroupSamples { ### DeploymentStacks_CreateOrUpdateAtResourceGroup ```java +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -99,31 +136,39 @@ import java.util.Map; */ public final class DeploymentStacksCreateOrUpdateAtResourceGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackResourceGroupCreate.json + * x-ms-original-file: 2025-07-01/DeploymentStackResourceGroupCreate.json */ /** - * Sample code: DeploymentStacksResourceGroupCreateOrUpdate. + * Sample code: Create or update a resource group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksResourceGroupCreateOrUpdate( + public static void createOrUpdateAResourceGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .define("simpleDeploymentStack") .withExistingResourceGroup("deploymentStacksRG") .withRegion("eastus") .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withProperties(new DeploymentStackProperties() - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false))) + .withParameters(mapOf("parameter1", + new DeploymentParameter().withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) + .withExtensionConfigs( + mapOf("contoso", + new DeploymentExtensionConfig() + .withAdditionalProperties( + mapOf("configTwo", + new DeploymentExtensionConfigItem() + .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), + "configOne", + new DeploymentExtensionConfigItem().withValue( + BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false)) .create(); } @@ -144,13 +189,16 @@ public final class DeploymentStacksCreateOrUpdateAtResourceGroupSamples { ### DeploymentStacks_CreateOrUpdateAtSubscription ```java +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -160,29 +208,37 @@ import java.util.Map; */ public final class DeploymentStacksCreateOrUpdateAtSubscriptionSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackSubscriptionCreate.json + * x-ms-original-file: 2025-07-01/DeploymentStackSubscriptionCreate.json */ /** - * Sample code: DeploymentStacksSubscriptionCreateOrUpdate. + * Sample code: Create or update a subscription Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksSubscriptionCreateOrUpdate( + public static void createOrUpdateASubscriptionDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .createOrUpdateAtSubscription("simpleDeploymentStack", new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withProperties(new DeploymentStackProperties() - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .createOrUpdateAtSubscription("simpleDeploymentStack", + new DeploymentStackInner().withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .withParameters(mapOf("parameter1", + new DeploymentParameter() + .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) + .withExtensionConfigs( + mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", + new DeploymentExtensionConfigItem() + .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), + "configOne", + new DeploymentExtensionConfigItem().withValue( + BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false))), + .withApplyToChildScopes(false)), com.azure.core.util.Context.NONE); } @@ -209,19 +265,17 @@ public final class DeploymentStacksCreateOrUpdateAtSubscriptionSamples { */ public final class DeploymentStacksDeleteSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackResourceGroupDelete.json + * x-ms-original-file: 2025-07-01/DeploymentStackResourceGroupDelete.json */ /** - * Sample code: DeploymentStacksResourceGroupDelete. + * Sample code: Delete a resource group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksResourceGroupDelete( + public static void deleteAResourceGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .delete("deploymentStacksRG", "simpleDeploymentStack", null, null, null, null, + .delete("deploymentStacksRG", "simpleDeploymentStack", null, null, null, null, null, com.azure.core.util.Context.NONE); } } @@ -236,19 +290,17 @@ public final class DeploymentStacksDeleteSamples { */ public final class DeploymentStacksDeleteAtManagementGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackManagementGroupDelete.json + * x-ms-original-file: 2025-07-01/DeploymentStackManagementGroupDelete.json */ /** - * Sample code: DeploymentStacksManagementGroupDelete. + * Sample code: Delete a management group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksManagementGroupDelete( + public static void deleteAManagementGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .deleteAtManagementGroup("myMg", "simpleDeploymentStack", null, null, null, null, + .deleteAtManagementGroup("myMg", "simpleDeploymentStack", null, null, null, null, null, com.azure.core.util.Context.NONE); } } @@ -263,19 +315,18 @@ public final class DeploymentStacksDeleteAtManagementGroupSamples { */ public final class DeploymentStacksDeleteAtSubscriptionSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackSubscriptionDelete.json + * x-ms-original-file: 2025-07-01/DeploymentStackSubscriptionDelete.json */ /** - * Sample code: DeploymentStacksSubscriptionDelete. + * Sample code: Delete a subscription Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksSubscriptionDelete( + public static void deleteASubscriptionDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .deleteAtSubscription("simpleDeploymentStack", null, null, null, null, com.azure.core.util.Context.NONE); + .deleteAtSubscription("simpleDeploymentStack", null, null, null, null, null, + com.azure.core.util.Context.NONE); } } ``` @@ -288,16 +339,14 @@ public final class DeploymentStacksDeleteAtSubscriptionSamples { */ public final class DeploymentStacksExportTemplateAtManagementGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackManagementGroupExportTemplate.json + * x-ms-original-file: 2025-07-01/DeploymentStackManagementGroupExportTemplate.json */ /** - * Sample code: DeploymentStacksManagementGroupExportTemplate. + * Sample code: Export the Deployment template for a management group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksManagementGroupExportTemplate( + public static void exportTheDeploymentTemplateForAManagementGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .exportTemplateAtManagementGroupWithResponse("myMg", "simpleDeploymentStack", @@ -314,16 +363,14 @@ public final class DeploymentStacksExportTemplateAtManagementGroupSamples { */ public final class DeploymentStacksExportTemplateAtResourceGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackExportTemplate.json + * x-ms-original-file: 2025-07-01/DeploymentStackExportTemplate.json */ /** - * Sample code: DeploymentStacksResourceGroupExportTemplate. + * Sample code: Export the Deployment template for a resource group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksResourceGroupExportTemplate( + public static void exportTheDeploymentTemplateForAResourceGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .exportTemplateAtResourceGroupWithResponse("deploymentStacksRG", "simpleDeploymentStack", @@ -340,16 +387,14 @@ public final class DeploymentStacksExportTemplateAtResourceGroupSamples { */ public final class DeploymentStacksExportTemplateAtSubscriptionSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackSubscriptionExportTemplate.json + * x-ms-original-file: 2025-07-01/DeploymentStackSubscriptionExportTemplate.json */ /** - * Sample code: DeploymentStacksSubscriptionExportTemplate. + * Sample code: Export the Deployment template for a subscription Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksSubscriptionExportTemplate( + public static void exportTheDeploymentTemplateForASubscriptionDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .exportTemplateAtSubscriptionWithResponse("simpleDeploymentStack", com.azure.core.util.Context.NONE); @@ -365,16 +410,14 @@ public final class DeploymentStacksExportTemplateAtSubscriptionSamples { */ public final class DeploymentStacksGetAtManagementGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackManagementGroupGet.json + * x-ms-original-file: 2025-07-01/DeploymentStackManagementGroupGet.json */ /** - * Sample code: DeploymentStacksManagementGroupGet. + * Sample code: Get a management group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksManagementGroupGet( + public static void getAManagementGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .getAtManagementGroupWithResponse("myMg", "simpleDeploymentStack", com.azure.core.util.Context.NONE); @@ -390,16 +433,14 @@ public final class DeploymentStacksGetAtManagementGroupSamples { */ public final class DeploymentStacksGetAtSubscriptionSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackSubscriptionGet.json + * x-ms-original-file: 2025-07-01/DeploymentStackSubscriptionGet.json */ /** - * Sample code: DeploymentStacksSubscriptionGet. + * Sample code: Get a subscription Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksSubscriptionGet( + public static void getASubscriptionDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .getAtSubscriptionWithResponse("simpleDeploymentStack", com.azure.core.util.Context.NONE); @@ -415,16 +456,14 @@ public final class DeploymentStacksGetAtSubscriptionSamples { */ public final class DeploymentStacksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackResourceGroupGet.json + * x-ms-original-file: 2025-07-01/DeploymentStackResourceGroupGet.json */ /** - * Sample code: DeploymentStacksResourceGroupGet. + * Sample code: Get a resource group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksResourceGroupGet( + public static void getAResourceGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .getByResourceGroupWithResponse("deploymentStacksRG", "simpleDeploymentStack", @@ -441,16 +480,14 @@ public final class DeploymentStacksGetByResourceGroupSamples { */ public final class DeploymentStacksListSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackSubscriptionList.json + * x-ms-original-file: 2025-07-01/DeploymentStackSubscriptionList.json */ /** - * Sample code: DeploymentStacksSubscriptionList. + * Sample code: List subscription Deployment stacks. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksSubscriptionList( + public static void listSubscriptionDeploymentStacks( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks().list(com.azure.core.util.Context.NONE); } @@ -465,16 +502,14 @@ public final class DeploymentStacksListSamples { */ public final class DeploymentStacksListAtManagementGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackManagementGroupList.json + * x-ms-original-file: 2025-07-01/DeploymentStackManagementGroupList.json */ /** - * Sample code: DeploymentStacksManagementGroupList. + * Sample code: List management group Deployment stacks. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksManagementGroupList( + public static void listManagementGroupDeploymentStacks( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks().listAtManagementGroup("myMg", com.azure.core.util.Context.NONE); } @@ -489,16 +524,14 @@ public final class DeploymentStacksListAtManagementGroupSamples { */ public final class DeploymentStacksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackResourceGroupList.json + * x-ms-original-file: 2025-07-01/DeploymentStackResourceGroupList.json */ /** - * Sample code: DeploymentStacksResourceGroupList. + * Sample code: List resource group Deployment stacks. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksResourceGroupList( + public static void listResourceGroupDeploymentStacks( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks().listByResourceGroup("deploymentStacksRG", com.azure.core.util.Context.NONE); } @@ -508,14 +541,15 @@ public final class DeploymentStacksListByResourceGroupSamples { ### DeploymentStacks_ValidateStackAtManagementGroup ```java +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -525,32 +559,31 @@ import java.util.Map; */ public final class DeploymentStacksValidateStackAtManagementGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackManagementGroupValidate.json + * x-ms-original-file: 2025-07-01/DeploymentStackManagementGroupValidate.json */ /** - * Sample code: DeploymentStacksManagementGroupValidate. + * Sample code: Validate a management group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksManagementGroupValidate( + public static void validateAManagementGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .validateStackAtManagementGroup("myMg", "simpleDeploymentStack", new DeploymentStackInner() - .withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withProperties(new DeploymentStackProperties() + .validateStackAtManagementGroup("myMg", "simpleDeploymentStack", + new DeploymentStackInner().withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) .withTemplateLink( new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withParameters(mapOf("parameter1", + new DeploymentParameter() + .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DETACH) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DETACH) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false))), + .withApplyToChildScopes(false)), com.azure.core.util.Context.NONE); } @@ -571,14 +604,15 @@ public final class DeploymentStacksValidateStackAtManagementGroupSamples { ### DeploymentStacks_ValidateStackAtResourceGroup ```java +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -588,31 +622,30 @@ import java.util.Map; */ public final class DeploymentStacksValidateStackAtResourceGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackResourceGroupValidate.json + * x-ms-original-file: 2025-07-01/DeploymentStackResourceGroupValidate.json */ /** - * Sample code: DeploymentStacksResourceGroupValidate. + * Sample code: Validate a resource group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksResourceGroupValidate( + public static void validateAResourceGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .validateStackAtResourceGroup("deploymentStacksRG", "simpleDeploymentStack", new DeploymentStackInner() - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withProperties(new DeploymentStackProperties() + .validateStackAtResourceGroup("deploymentStacksRG", "simpleDeploymentStack", + new DeploymentStackInner().withTags(mapOf("tagkey", "fakeTokenPlaceholder")) .withTemplateLink( new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withParameters(mapOf("parameter1", + new DeploymentParameter() + .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false))), + .withApplyToChildScopes(false)), com.azure.core.util.Context.NONE); } @@ -633,14 +666,15 @@ public final class DeploymentStacksValidateStackAtResourceGroupSamples { ### DeploymentStacks_ValidateStackAtSubscription ```java +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -650,31 +684,31 @@ import java.util.Map; */ public final class DeploymentStacksValidateStackAtSubscriptionSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackSubscriptionValidate.json + * x-ms-original-file: 2025-07-01/DeploymentStackSubscriptionValidate.json */ /** - * Sample code: DeploymentStacksSubscriptionValidate. + * Sample code: Validate a subscription Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksSubscriptionValidate( + public static void validateASubscriptionDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .validateStackAtSubscription("simpleDeploymentStack", new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withProperties(new DeploymentStackProperties() + .validateStackAtSubscription("simpleDeploymentStack", + new DeploymentStackInner().withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) .withTemplateLink( new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withParameters(mapOf("parameter1", + new DeploymentParameter() + .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false))), + .withApplyToChildScopes(false)), com.azure.core.util.Context.NONE); } @@ -692,3 +726,503 @@ public final class DeploymentStacksValidateStackAtSubscriptionSamples { } ``` +### DeploymentStacksWhatIfResultsAtManagementGroup_CreateOrUpdate + +```java +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DeploymentStacksWhatIfResultsAtManagementGroup CreateOrUpdate. + */ +public final class DeploymentStacksWhatIfResultsAtManagementGroupCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsManagementGroupCreate.json + */ + /** + * Sample code: Create or update a management group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void createOrUpdateAManagementGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtManagementGroups() + .createOrUpdate("myMg", "simpleDeploymentStackWhatIfResult", + new DeploymentStacksWhatIfResultInner() + .withProperties(new DeploymentStacksWhatIfResultProperties() + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf()) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", + new DeploymentExtensionConfigItem() + .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), + "configOne", + new DeploymentExtensionConfigItem().withValue( + BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) + .withActionOnUnmanage(new ActionOnUnmanage() + .withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings( + new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) + .withDeploymentStackResourceId( + "/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") + .withRetentionInterval(Duration.parse("P7D"))) + .withLocation("eastus"), + 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; + } +} +``` + +### DeploymentStacksWhatIfResultsAtManagementGroup_Delete + +```java + +/** + * Samples for DeploymentStacksWhatIfResultsAtManagementGroup Delete. + */ +public final class DeploymentStacksWhatIfResultsAtManagementGroupDeleteSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsManagementGroupDelete.json + */ + /** + * Sample code: Delete a management group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void deleteAManagementGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtManagementGroups() + .deleteWithResponse("myMg", "simpleDeploymentStack", null, null, null, null, null, + com.azure.core.util.Context.NONE); + } +} +``` + +### DeploymentStacksWhatIfResultsAtManagementGroup_Get + +```java +/** + * Samples for DeploymentStacksWhatIfResultsAtManagementGroup Get. + */ +public final class DeploymentStacksWhatIfResultsAtManagementGroupGetSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsManagementGroupGet.json + */ + /** + * Sample code: Get a management group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void getAManagementGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtManagementGroups() + .getWithResponse("myMg", "simpleDeploymentStackWhatIfResult", com.azure.core.util.Context.NONE); + } +} +``` + +### DeploymentStacksWhatIfResultsAtManagementGroup_List + +```java +/** + * Samples for DeploymentStacksWhatIfResultsAtManagementGroup List. + */ +public final class DeploymentStacksWhatIfResultsAtManagementGroupListSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsManagementGroupList.json + */ + /** + * Sample code: List the available Deployment stack what-if results at management group scope. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void listTheAvailableDeploymentStackWhatIfResultsAtManagementGroupScope( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtManagementGroups().list("myMg", com.azure.core.util.Context.NONE); + } +} +``` + +### DeploymentStacksWhatIfResultsAtManagementGroup_WhatIf + +```java +/** + * Samples for DeploymentStacksWhatIfResultsAtManagementGroup WhatIf. + */ +public final class DeploymentStacksWhatIfResultsAtManagementGroupWhatIfSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsManagementGroupWhatIf.json + */ + /** + * Sample code: Get a detailed management group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void getADetailedManagementGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtManagementGroups() + .whatIf("myMg", "changedDeploymentStackWhatIfResult", com.azure.core.util.Context.NONE); + } +} +``` + +### DeploymentStacksWhatIfResultsAtResourceGroup_CreateOrUpdate + +```java +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DeploymentStacksWhatIfResultsAtResourceGroup CreateOrUpdate. + */ +public final class DeploymentStacksWhatIfResultsAtResourceGroupCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsResourceGroupCreate.json + */ + /** + * Sample code: Create or update a resource group scoped Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void createOrUpdateAResourceGroupScopedDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtResourceGroups() + .define("simpleDeploymentStackWhatIfResult") + .withExistingResourceGroup("myResourceGroup") + .withRegion("eastus") + .withProperties( + new DeploymentStacksWhatIfResultProperties() + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf()) + .withExtensionConfigs( + mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", + new DeploymentExtensionConfigItem() + .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), + "configOne", + new DeploymentExtensionConfigItem().withValue( + BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) + .withActionOnUnmanage(new ActionOnUnmanage() + .withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) + .withDeploymentStackResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") + .withRetentionInterval(Duration.parse("P7D"))) + .create(); + } + + // 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; + } +} +``` + +### DeploymentStacksWhatIfResultsAtResourceGroup_Delete + +```java + +/** + * Samples for DeploymentStacksWhatIfResultsAtResourceGroup Delete. + */ +public final class DeploymentStacksWhatIfResultsAtResourceGroupDeleteSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsResourceGroupDelete.json + */ + /** + * Sample code: Delete a resource group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void deleteAResourceGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtResourceGroups() + .deleteWithResponse("myResourceGroup", "simpleDeploymentStack", null, null, null, null, null, + com.azure.core.util.Context.NONE); + } +} +``` + +### DeploymentStacksWhatIfResultsAtResourceGroup_GetByResourceGroup + +```java +/** + * Samples for DeploymentStacksWhatIfResultsAtResourceGroup GetByResourceGroup. + */ +public final class DeploymentStacksWhatIfResultsAtResourceGroupGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsResourceGroupGet.json + */ + /** + * Sample code: Get a resource group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void getAResourceGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtResourceGroups() + .getByResourceGroupWithResponse("myResourceGroup", "simpleDeploymentStackWhatIfResult", + com.azure.core.util.Context.NONE); + } +} +``` + +### DeploymentStacksWhatIfResultsAtResourceGroup_ListByResourceGroup + +```java +/** + * Samples for DeploymentStacksWhatIfResultsAtResourceGroup ListByResourceGroup. + */ +public final class DeploymentStacksWhatIfResultsAtResourceGroupListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsResourceGroupList.json + */ + /** + * Sample code: List the available Deployment stack what-if results at resource group scope. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void listTheAvailableDeploymentStackWhatIfResultsAtResourceGroupScope( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtResourceGroups() + .listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); + } +} +``` + +### DeploymentStacksWhatIfResultsAtResourceGroup_WhatIf + +```java +/** + * Samples for DeploymentStacksWhatIfResultsAtResourceGroup WhatIf. + */ +public final class DeploymentStacksWhatIfResultsAtResourceGroupWhatIfSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsResourceGroupWhatIf.json + */ + /** + * Sample code: Get a detailed resource group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void getADetailedResourceGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtResourceGroups() + .whatIf("myResourceGroup", "changedDeploymentStackWhatIfResult", com.azure.core.util.Context.NONE); + } +} +``` + +### DeploymentStacksWhatIfResultsAtSubscription_CreateOrUpdate + +```java +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DeploymentStacksWhatIfResultsAtSubscription CreateOrUpdate. + */ +public final class DeploymentStacksWhatIfResultsAtSubscriptionCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsSubscriptionCreate.json + */ + /** + * Sample code: Create or update a subscription-scoped Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void createOrUpdateASubscriptionScopedDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtSubscriptions() + .createOrUpdate("simpleDeploymentStackWhatIfResult", + new DeploymentStacksWhatIfResultInner() + .withProperties(new DeploymentStacksWhatIfResultProperties() + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf()) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", + new DeploymentExtensionConfigItem() + .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), + "configOne", + new DeploymentExtensionConfigItem().withValue( + BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) + .withActionOnUnmanage(new ActionOnUnmanage() + .withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings( + new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) + .withDeploymentStackResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") + .withRetentionInterval(Duration.parse("P7D"))) + .withLocation("eastus"), + 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; + } +} +``` + +### DeploymentStacksWhatIfResultsAtSubscription_Delete + +```java + +/** + * Samples for DeploymentStacksWhatIfResultsAtSubscription Delete. + */ +public final class DeploymentStacksWhatIfResultsAtSubscriptionDeleteSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsSubscriptionDelete.json + */ + /** + * Sample code: Delete a subscription Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void deleteASubscriptionDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtSubscriptions() + .deleteWithResponse("simpleDeploymentStack", null, null, null, null, null, + com.azure.core.util.Context.NONE); + } +} +``` + +### DeploymentStacksWhatIfResultsAtSubscription_Get + +```java +/** + * Samples for DeploymentStacksWhatIfResultsAtSubscription Get. + */ +public final class DeploymentStacksWhatIfResultsAtSubscriptionGetSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsSubscriptionGet.json + */ + /** + * Sample code: Get a subscription Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void getASubscriptionDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtSubscriptions() + .getWithResponse("simpleDeploymentStackWhatIfResult", com.azure.core.util.Context.NONE); + } +} +``` + +### DeploymentStacksWhatIfResultsAtSubscription_List + +```java +/** + * Samples for DeploymentStacksWhatIfResultsAtSubscription List. + */ +public final class DeploymentStacksWhatIfResultsAtSubscriptionListSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsSubscriptionList.json + */ + /** + * Sample code: List the available Deployment stack what-if results at subscription scope. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void listTheAvailableDeploymentStackWhatIfResultsAtSubscriptionScope( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtSubscriptions().list(com.azure.core.util.Context.NONE); + } +} +``` + +### DeploymentStacksWhatIfResultsAtSubscription_WhatIf + +```java +/** + * Samples for DeploymentStacksWhatIfResultsAtSubscription WhatIf. + */ +public final class DeploymentStacksWhatIfResultsAtSubscriptionWhatIfSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsSubscriptionWhatIf.json + */ + /** + * Sample code: Get a detailed subscription Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void getADetailedSubscriptionDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtSubscriptions() + .whatIf("changedDeploymentStackWhatIfResult", com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/pom.xml b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/pom.xml index 6c84852a89b3..18801170ff17 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/pom.xml +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-resources-deploymentstacks - 1.1.0-beta.1 + 1.1.0 jar Microsoft Azure SDK for Deployment Stacks Management - This package contains Microsoft Azure SDK for Deployment Stacks Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. DeploymentStacks Client. Package tag package-2024-03. + This package contains Microsoft Azure SDK for Deployment Stacks Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The APIs listed in this specification can be used to manage Deployment stack resources through the Azure Resource Manager. Package api-version 2025-07-01. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/DeploymentStacksManager.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/DeploymentStacksManager.java index 9e865390421a..3a619c41f15a 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/DeploymentStacksManager.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/DeploymentStacksManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks; @@ -27,7 +27,13 @@ import com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksManagementClient; import com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksImpl; import com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksManagementClientBuilder; +import com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksWhatIfResultsAtManagementGroupsImpl; +import com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksWhatIfResultsAtResourceGroupsImpl; +import com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksWhatIfResultsAtSubscriptionsImpl; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacks; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultsAtManagementGroups; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultsAtResourceGroups; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultsAtSubscriptions; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -38,9 +44,16 @@ /** * Entry point to DeploymentStacksManager. - * DeploymentStacks Client. + * The APIs listed in this specification can be used to manage Deployment stack resources through the Azure Resource + * Manager. */ public final class DeploymentStacksManager { + private DeploymentStacksWhatIfResultsAtResourceGroups deploymentStacksWhatIfResultsAtResourceGroups; + + private DeploymentStacksWhatIfResultsAtSubscriptions deploymentStacksWhatIfResultsAtSubscriptions; + + private DeploymentStacksWhatIfResultsAtManagementGroups deploymentStacksWhatIfResultsAtManagementGroups; + private DeploymentStacks deploymentStacks; private final DeploymentStacksManagementClient clientObject; @@ -258,6 +271,47 @@ public DeploymentStacksManager authenticate(TokenCredential credential, AzurePro } } + /** + * Gets the resource collection API of DeploymentStacksWhatIfResultsAtResourceGroups. It manages + * DeploymentStacksWhatIfResult. + * + * @return Resource collection API of DeploymentStacksWhatIfResultsAtResourceGroups. + */ + public DeploymentStacksWhatIfResultsAtResourceGroups deploymentStacksWhatIfResultsAtResourceGroups() { + if (this.deploymentStacksWhatIfResultsAtResourceGroups == null) { + this.deploymentStacksWhatIfResultsAtResourceGroups = new DeploymentStacksWhatIfResultsAtResourceGroupsImpl( + clientObject.getDeploymentStacksWhatIfResultsAtResourceGroups(), this); + } + return deploymentStacksWhatIfResultsAtResourceGroups; + } + + /** + * Gets the resource collection API of DeploymentStacksWhatIfResultsAtSubscriptions. + * + * @return Resource collection API of DeploymentStacksWhatIfResultsAtSubscriptions. + */ + public DeploymentStacksWhatIfResultsAtSubscriptions deploymentStacksWhatIfResultsAtSubscriptions() { + if (this.deploymentStacksWhatIfResultsAtSubscriptions == null) { + this.deploymentStacksWhatIfResultsAtSubscriptions = new DeploymentStacksWhatIfResultsAtSubscriptionsImpl( + clientObject.getDeploymentStacksWhatIfResultsAtSubscriptions(), this); + } + return deploymentStacksWhatIfResultsAtSubscriptions; + } + + /** + * Gets the resource collection API of DeploymentStacksWhatIfResultsAtManagementGroups. + * + * @return Resource collection API of DeploymentStacksWhatIfResultsAtManagementGroups. + */ + public DeploymentStacksWhatIfResultsAtManagementGroups deploymentStacksWhatIfResultsAtManagementGroups() { + if (this.deploymentStacksWhatIfResultsAtManagementGroups == null) { + this.deploymentStacksWhatIfResultsAtManagementGroups + = new DeploymentStacksWhatIfResultsAtManagementGroupsImpl( + clientObject.getDeploymentStacksWhatIfResultsAtManagementGroups(), this); + } + return deploymentStacksWhatIfResultsAtManagementGroups; + } + /** * Gets the resource collection API of DeploymentStacks. It manages DeploymentStack. * diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksClient.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksClient.java index 32f8e2376523..a43bca6daffe 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksClient.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.fluent; @@ -14,178 +14,198 @@ import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackTemplateDefinitionInner; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackValidateResultInner; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionManagementGroupMode; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionResourceGroupMode; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionResourceMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; /** * An instance of this class provides access to all the operations defined in DeploymentStacksClient. */ public interface DeploymentStacksClient { /** - * Lists all the Deployment stacks within the specified Resource Group. + * Gets the Deployment stack with the given name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the Deployment stack with the given name along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String deploymentStackName, + Context context); /** - * Lists all the Deployment stacks within the specified Resource Group. + * Gets the Deployment stack with the given name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the Deployment stack with the given name. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStackInner getByResourceGroup(String resourceGroupName, String deploymentStackName); /** - * Lists all the Deployment stacks within the specified Subscription. + * Lists Deployment stacks at the specified scope. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Lists all the Deployment stacks within the specified Subscription. + * Lists Deployment stacks at the specified scope. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Lists all the Deployment stacks within the specified Management Group. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * - * @param managementGroupId Management Group id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAtManagementGroup(String managementGroupId); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DeploymentStackValidateResultInner> + beginValidateStackAtResourceGroup(String resourceGroupName, String deploymentStackName, + DeploymentStackInner deploymentStack); /** - * Lists all the Deployment stacks within the specified Management Group. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * - * @param managementGroupId Management Group id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAtManagementGroup(String managementGroupId, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DeploymentStackValidateResultInner> + beginValidateStackAtResourceGroup(String resourceGroupName, String deploymentStackName, + DeploymentStackInner deploymentStack, Context context); /** - * Creates or updates a Deployment stack at Resource Group scope. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deployment stack object. + * @return the response. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtResourceGroup( - String resourceGroupName, String deploymentStackName, DeploymentStackInner deploymentStack); + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStackValidateResultInner validateStackAtResourceGroup(String resourceGroupName, + String deploymentStackName, DeploymentStackInner deploymentStack); /** - * Creates or updates a Deployment stack at Resource Group scope. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deployment stack object. + * @return the response. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtResourceGroup( - String resourceGroupName, String deploymentStackName, DeploymentStackInner deploymentStack, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStackValidateResultInner validateStackAtResourceGroup(String resourceGroupName, + String deploymentStackName, DeploymentStackInner deploymentStack, Context context); /** - * Creates or updates a Deployment stack at Resource Group scope. + * Creates or updates a Deployment stack at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object. + * @return the {@link SyncPoller} for polling of deployment stack object. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackInner createOrUpdateAtResourceGroup(String resourceGroupName, String deploymentStackName, - DeploymentStackInner deploymentStack); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtResourceGroup( + String resourceGroupName, String deploymentStackName, DeploymentStackInner deploymentStack); /** - * Creates or updates a Deployment stack at Resource Group scope. + * Creates or updates a Deployment stack at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object. + * @return the {@link SyncPoller} for polling of deployment stack object. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackInner createOrUpdateAtResourceGroup(String resourceGroupName, String deploymentStackName, - DeploymentStackInner deploymentStack, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtResourceGroup( + String resourceGroupName, String deploymentStackName, DeploymentStackInner deploymentStack, Context context); /** - * Gets a Deployment stack with a given name at Resource Group scope. + * Creates or updates a Deployment stack at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param context The context to associate with this operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Resource Group scope along with {@link Response}. + * @return deployment stack object. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String deploymentStackName, - Context context); + DeploymentStackInner createOrUpdateAtResourceGroup(String resourceGroupName, String deploymentStackName, + DeploymentStackInner deploymentStack); /** - * Gets a Deployment stack with a given name at Resource Group scope. + * Creates or updates a Deployment stack at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Resource Group scope. + * @return deployment stack object. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackInner getByResourceGroup(String resourceGroupName, String deploymentStackName); + DeploymentStackInner createOrUpdateAtResourceGroup(String resourceGroupName, String deploymentStackName, + DeploymentStackInner deploymentStack, Context context); /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -199,7 +219,7 @@ Response getByResourceGroupWithResponse(String resourceGro SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentStackName); /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -207,6 +227,8 @@ Response getByResourceGroupWithResponse(String resourceGro * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @param context The context to associate with this operation. @@ -217,13 +239,14 @@ Response getByResourceGroupWithResponse(String resourceGro */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context); + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -236,7 +259,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String deploymentStackName); /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -244,6 +267,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @param context The context to associate with this operation. @@ -253,116 +278,109 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context); + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); /** - * Creates or updates a Deployment stack at Subscription scope. + * Exports the template used to create the Deployment stack at the specified scope. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deployment stack object. + * @return export Template specific properties of the Deployment stack along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeploymentStackInner> - beginCreateOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack); + @ServiceMethod(returns = ReturnType.SINGLE) + Response exportTemplateAtResourceGroupWithResponse(String resourceGroupName, + String deploymentStackName, Context context); /** - * Creates or updates a Deployment stack at Subscription scope. + * Exports the template used to create the Deployment stack at the specified scope. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deployment stack object. + * @return export Template specific properties of the Deployment stack. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtSubscription( - String deploymentStackName, DeploymentStackInner deploymentStack, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStackTemplateDefinitionInner exportTemplateAtResourceGroup(String resourceGroupName, + String deploymentStackName); /** - * Creates or updates a Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object. + * @return the Deployment stack with the given name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackInner createOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack); + Response getAtSubscriptionWithResponse(String deploymentStackName, Context context); /** - * Creates or updates a Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object. + * @return the Deployment stack with the given name. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackInner createOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack, - Context context); + DeploymentStackInner getAtSubscription(String deploymentStackName); /** - * Gets a Deployment stack with a given name at Subscription scope. + * Lists Deployment stacks at the specified scope. * - * @param deploymentStackName Name of the deployment stack. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Subscription scope along with {@link Response}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getAtSubscriptionWithResponse(String deploymentStackName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Gets a Deployment stack with a given name at Subscription scope. + * Lists Deployment stacks at the specified scope. * - * @param deploymentStackName Name of the deployment stack. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Subscription scope. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackInner getAtSubscription(String deploymentStackName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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> beginDeleteAtSubscription(String deploymentStackName); + SyncPoller, DeploymentStackValidateResultInner> + beginValidateStackAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack); /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param deploymentStackName Name of the deployment stack. - * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. - * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. - * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. - * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not - * correctly synchronized. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -370,66 +388,60 @@ DeploymentStackInner createOrUpdateAtSubscription(String deploymentStackName, De * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteAtSubscription(String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context); + SyncPoller, DeploymentStackValidateResultInner> + beginValidateStackAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack, + Context context); /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteAtSubscription(String deploymentStackName); + DeploymentStackValidateResultInner validateStackAtSubscription(String deploymentStackName, + DeploymentStackInner deploymentStack); /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param deploymentStackName Name of the deployment stack. - * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. - * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. - * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. - * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not - * correctly synchronized. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteAtSubscription(String deploymentStackName, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context); + DeploymentStackValidateResultInner validateStackAtSubscription(String deploymentStackName, + DeploymentStackInner deploymentStack, Context context); /** - * Creates or updates a Deployment stack at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deployment stack object. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtManagementGroup( - String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack); + SyncPoller, DeploymentStackInner> + beginCreateOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack); /** - * Creates or updates a Deployment stack at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -437,30 +449,27 @@ SyncPoller, DeploymentStackInner> beginCreateOr * @return the {@link SyncPoller} for polling of deployment stack object. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtManagementGroup( - String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context); + SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtSubscription( + String deploymentStackName, DeploymentStackInner deploymentStack, Context context); /** - * Creates or updates a Deployment stack at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return deployment stack object. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackInner createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, - DeploymentStackInner deploymentStack); + DeploymentStackInner createOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack); /** - * Creates or updates a Deployment stack at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -468,42 +477,13 @@ DeploymentStackInner createOrUpdateAtManagementGroup(String managementGroupId, S * @return deployment stack object. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackInner createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, - DeploymentStackInner deploymentStack, Context context); - - /** - * Gets a Deployment stack with a given name at Management Group scope. - * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Management Group scope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getAtManagementGroupWithResponse(String managementGroupId, - String deploymentStackName, Context context); - - /** - * Gets a Deployment stack with a given name at Management Group scope. - * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Management Group scope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackInner getAtManagementGroup(String managementGroupId, String deploymentStackName); + DeploymentStackInner createOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack, + Context context); /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -511,18 +491,18 @@ Response getAtManagementGroupWithResponse(String managemen * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteAtManagementGroup(String managementGroupId, - String deploymentStackName); + SyncPoller, Void> beginDeleteAtSubscription(String deploymentStackName); /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @param context The context to associate with this operation. @@ -532,34 +512,35 @@ SyncPoller, Void> beginDeleteAtManagementGroup(String managemen * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteAtManagementGroup(String managementGroupId, - String deploymentStackName, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context); + SyncPoller, Void> beginDeleteAtSubscription(String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteAtManagementGroup(String managementGroupId, String deploymentStackName); + void deleteAtSubscription(String deploymentStackName); /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @param context The context to associate with this operation. @@ -568,16 +549,15 @@ SyncPoller, Void> beginDeleteAtManagementGroup(String managemen * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteAtManagementGroup(String managementGroupId, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context); + void deleteAtSubscription(String deploymentStackName, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); /** - * Exports the template used to create the Deployment stack at Resource Group scope. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -586,13 +566,12 @@ void deleteAtManagementGroup(String managementGroupId, String deploymentStackNam * @return export Template specific properties of the Deployment stack along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response exportTemplateAtResourceGroupWithResponse(String resourceGroupName, - String deploymentStackName, Context context); + Response + exportTemplateAtSubscriptionWithResponse(String deploymentStackName, Context context); /** - * Exports the template used to create the Deployment stack at Resource Group scope. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -600,260 +579,298 @@ Response exportTemplateAtResourceGroupWi * @return export Template specific properties of the Deployment stack. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackTemplateDefinitionInner exportTemplateAtResourceGroup(String resourceGroupName, - String deploymentStackName); + DeploymentStackTemplateDefinitionInner exportTemplateAtSubscription(String deploymentStackName); /** - * Exports the template used to create the Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack along with {@link Response}. + * @return the Deployment stack with the given name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response - exportTemplateAtSubscriptionWithResponse(String deploymentStackName, Context context); + Response getAtManagementGroupWithResponse(String managementGroupId, + String deploymentStackName, Context context); /** - * Exports the template used to create the Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack. + * @return the Deployment stack with the given name. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackTemplateDefinitionInner exportTemplateAtSubscription(String deploymentStackName); + DeploymentStackInner getAtManagementGroup(String managementGroupId, String deploymentStackName); /** - * Exports the template used to create the Deployment stack at Management Group scope. + * Lists Deployment stacks at the specified scope. * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. - * @param context The context to associate with this operation. + * @param managementGroupId The name of the management group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack along with {@link Response}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response exportTemplateAtManagementGroupWithResponse( - String managementGroupId, String deploymentStackName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAtManagementGroup(String managementGroupId); /** - * Exports the template used to create the Deployment stack at Management Group scope. + * Lists Deployment stacks at the specified scope. * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackTemplateDefinitionInner exportTemplateAtManagementGroup(String managementGroupId, - String deploymentStackName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAtManagementGroup(String managementGroupId, Context context); /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the Deployment stack validation result. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DeploymentStackValidateResultInner> - beginValidateStackAtResourceGroup(String resourceGroupName, String deploymentStackName, + beginValidateStackAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack); /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the Deployment stack validation result. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DeploymentStackValidateResultInner> - beginValidateStackAtResourceGroup(String resourceGroupName, String deploymentStackName, + beginValidateStackAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context); /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackValidateResultInner validateStackAtResourceGroup(String resourceGroupName, + DeploymentStackValidateResultInner validateStackAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack); /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackValidateResultInner validateStackAtResourceGroup(String resourceGroupName, + DeploymentStackValidateResultInner validateStackAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context); /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Creates or updates a Deployment stack at the specified scope. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the Deployment stack validation result. + * @return the {@link SyncPoller} for polling of deployment stack object. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeploymentStackValidateResultInner> - beginValidateStackAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack); + SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtManagementGroup( + String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack); /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Creates or updates a Deployment stack at the specified scope. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the Deployment stack validation result. + * @return the {@link SyncPoller} for polling of deployment stack object. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeploymentStackValidateResultInner> - beginValidateStackAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack, - Context context); + SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtManagementGroup( + String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context); /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Creates or updates a Deployment stack at the specified scope. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return deployment stack object. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackValidateResultInner validateStackAtSubscription(String deploymentStackName, + DeploymentStackInner createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack); /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Creates or updates a Deployment stack at the specified scope. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return deployment stack object. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackValidateResultInner validateStackAtSubscription(String deploymentStackName, + DeploymentStackInner createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context); /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the Deployment stack validation result. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeploymentStackValidateResultInner> - beginValidateStackAtManagementGroup(String managementGroupId, String deploymentStackName, - DeploymentStackInner deploymentStack); + SyncPoller, Void> beginDeleteAtManagementGroup(String managementGroupId, + String deploymentStackName); /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the Deployment stack validation result. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeploymentStackValidateResultInner> - beginValidateStackAtManagementGroup(String managementGroupId, String deploymentStackName, - DeploymentStackInner deploymentStack, Context context); + SyncPoller, Void> beginDeleteAtManagementGroup(String managementGroupId, + String deploymentStackName, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackValidateResultInner validateStackAtManagementGroup(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack); + void deleteAtManagementGroup(String managementGroupId, String deploymentStackName); /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentStackValidateResultInner validateStackAtManagementGroup(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack, Context context); + void deleteAtManagementGroup(String managementGroupId, String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); + + /** + * Exports the template used to create the Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return export Template specific properties of the Deployment stack along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response exportTemplateAtManagementGroupWithResponse( + String managementGroupId, String deploymentStackName, Context context); + + /** + * Exports the template used to create the Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return export Template specific properties of the Deployment stack. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStackTemplateDefinitionInner exportTemplateAtManagementGroup(String managementGroupId, + String deploymentStackName); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksManagementClient.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksManagementClient.java index 35f36649ca74..bb03a2a458be 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksManagementClient.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.fluent; @@ -12,26 +12,26 @@ */ public interface DeploymentStacksManagementClient { /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -46,6 +46,27 @@ public interface DeploymentStacksManagementClient { */ Duration getDefaultPollInterval(); + /** + * Gets the DeploymentStacksWhatIfResultsAtResourceGroupsClient object to access its operations. + * + * @return the DeploymentStacksWhatIfResultsAtResourceGroupsClient object. + */ + DeploymentStacksWhatIfResultsAtResourceGroupsClient getDeploymentStacksWhatIfResultsAtResourceGroups(); + + /** + * Gets the DeploymentStacksWhatIfResultsAtSubscriptionsClient object to access its operations. + * + * @return the DeploymentStacksWhatIfResultsAtSubscriptionsClient object. + */ + DeploymentStacksWhatIfResultsAtSubscriptionsClient getDeploymentStacksWhatIfResultsAtSubscriptions(); + + /** + * Gets the DeploymentStacksWhatIfResultsAtManagementGroupsClient object to access its operations. + * + * @return the DeploymentStacksWhatIfResultsAtManagementGroupsClient object. + */ + DeploymentStacksWhatIfResultsAtManagementGroupsClient getDeploymentStacksWhatIfResultsAtManagementGroups(); + /** * Gets the DeploymentStacksClient object to access its operations. * diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtManagementGroupsClient.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtManagementGroupsClient.java new file mode 100644 index 000000000000..c32090438f74 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtManagementGroupsClient.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +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.SyncPoller; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; + +/** + * An instance of this class provides access to all the operations defined in + * DeploymentStacksWhatIfResultsAtManagementGroupsClient. + */ +public interface DeploymentStacksWhatIfResultsAtManagementGroupsClient { + /** + * Gets the Deployment stack with the given name. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String managementGroupId, + String deploymentStacksWhatIfResultName, Context context); + + /** + * Gets the Deployment stack with the given name. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner get(String managementGroupId, String deploymentStacksWhatIfResultName); + + /** + * Lists Deployment stacks at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String managementGroupId); + + /** + * Lists Deployment stacks at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String managementGroupId, Context context); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DeploymentStacksWhatIfResultInner> beginCreateOrUpdate( + String managementGroupId, String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DeploymentStacksWhatIfResultInner> beginCreateOrUpdate( + String managementGroupId, String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource, + Context context); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner createOrUpdate(String managementGroupId, String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner createOrUpdate(String managementGroupId, String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource, Context context); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String managementGroupId, String deploymentStacksWhatIfResultName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managementGroupId, String deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIf(String managementGroupId, String deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIf(String managementGroupId, String deploymentStacksWhatIfResultName, Context context); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner whatIf(String managementGroupId, String deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner whatIf(String managementGroupId, String deploymentStacksWhatIfResultName, + Context context); +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtResourceGroupsClient.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtResourceGroupsClient.java new file mode 100644 index 000000000000..dc24f0c7a404 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtResourceGroupsClient.java @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +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.SyncPoller; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; + +/** + * An instance of this class provides access to all the operations defined in + * DeploymentStacksWhatIfResultsAtResourceGroupsClient. + */ +public interface DeploymentStacksWhatIfResultsAtResourceGroupsClient { + /** + * Gets the Deployment stack with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String deploymentStacksWhatIfResultName, Context context); + + /** + * Gets the Deployment stack with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner getByResourceGroup(String resourceGroupName, + String deploymentStacksWhatIfResultName); + + /** + * Lists Deployment stacks at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists Deployment stacks at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DeploymentStacksWhatIfResultInner> beginCreateOrUpdate( + String resourceGroupName, String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DeploymentStacksWhatIfResultInner> beginCreateOrUpdate( + String resourceGroupName, String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource, + Context context); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner createOrUpdate(String resourceGroupName, String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner createOrUpdate(String resourceGroupName, String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource, Context context); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String deploymentStacksWhatIfResultName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIf(String resourceGroupName, String deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIf(String resourceGroupName, String deploymentStacksWhatIfResultName, Context context); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner whatIf(String resourceGroupName, String deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner whatIf(String resourceGroupName, String deploymentStacksWhatIfResultName, + Context context); +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtSubscriptionsClient.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtSubscriptionsClient.java new file mode 100644 index 000000000000..2df83d046f78 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtSubscriptionsClient.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +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.SyncPoller; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; + +/** + * An instance of this class provides access to all the operations defined in + * DeploymentStacksWhatIfResultsAtSubscriptionsClient. + */ +public interface DeploymentStacksWhatIfResultsAtSubscriptionsClient { + /** + * Gets the Deployment stack with the given name. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String deploymentStacksWhatIfResultName, + Context context); + + /** + * Gets the Deployment stack with the given name. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner get(String deploymentStacksWhatIfResultName); + + /** + * Lists Deployment stacks at the specified scope. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists Deployment stacks at the specified scope. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DeploymentStacksWhatIfResultInner> + beginCreateOrUpdate(String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DeploymentStacksWhatIfResultInner> beginCreateOrUpdate( + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource, Context context); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner createOrUpdate(String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner createOrUpdate(String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource, Context context); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String deploymentStacksWhatIfResultName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIf(String deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIf(String deploymentStacksWhatIfResultName, Context context); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner whatIf(String deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentStacksWhatIfResultInner whatIf(String deploymentStacksWhatIfResultName, Context context); +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackInner.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackInner.java index 6963cd9b4a8d..77b1168c62d9 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackInner.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackInner.java @@ -1,39 +1,56 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.resources.deploymentstacks.models.AzureResourceBase; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; +import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtension; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInput; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInputDefinition; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProvisioningState; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDebugSetting; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksParametersLink; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import com.azure.resourcemanager.resources.deploymentstacks.models.ManagedResourceReference; +import com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReference; +import com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReferenceExtended; +import com.azure.resourcemanager.resources.deploymentstacks.models.ValidationLevel; import java.io.IOException; +import java.util.List; import java.util.Map; /** * Deployment stack object. */ @Fluent -public final class DeploymentStackInner extends AzureResourceBase { +public final class DeploymentStackInner extends ProxyResource { /* - * The location of the Deployment stack. It cannot be changed after creation. It must be one of the supported Azure - * locations. + * Deployment stack properties. */ - private String location; + private DeploymentStackProperties innerProperties; /* - * Deployment stack resource tags. + * The geo-location where the resource lives. Required for subscription and management group scoped stacks. The + * location is inherited from the resource group for resource group scoped stacks. */ - private Map tags; + private String location; /* - * Deployment stack properties. + * Resource tags. */ - private DeploymentStackProperties properties; + private Map tags; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -62,8 +79,17 @@ public DeploymentStackInner() { } /** - * Get the location property: The location of the Deployment stack. It cannot be changed after creation. It must be - * one of the supported Azure locations. + * Get the innerProperties property: Deployment stack properties. + * + * @return the innerProperties value. + */ + private DeploymentStackProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the location property: The geo-location where the resource lives. Required for subscription and management + * group scoped stacks. The location is inherited from the resource group for resource group scoped stacks. * * @return the location value. */ @@ -72,8 +98,8 @@ public String location() { } /** - * Set the location property: The location of the Deployment stack. It cannot be changed after creation. It must be - * one of the supported Azure locations. + * Set the location property: The geo-location where the resource lives. Required for subscription and management + * group scoped stacks. The location is inherited from the resource group for resource group scoped stacks. * * @param location the location value to set. * @return the DeploymentStackInner object itself. @@ -84,7 +110,7 @@ public DeploymentStackInner withLocation(String location) { } /** - * Get the tags property: Deployment stack resource tags. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -93,7 +119,7 @@ public Map tags() { } /** - * Set the tags property: Deployment stack resource tags. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the DeploymentStackInner object itself. @@ -103,32 +129,11 @@ public DeploymentStackInner withTags(Map tags) { return this; } - /** - * Get the properties property: Deployment stack properties. - * - * @return the properties value. - */ - public DeploymentStackProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Deployment stack properties. - * - * @param properties the properties value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withProperties(DeploymentStackProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ - @Override public SystemData systemData() { return this.systemData; } @@ -164,15 +169,474 @@ public String id() { } /** - * Validates the instance. + * Get the error property: The error detail. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the error value. */ - @Override - public void validate() { - if (properties() != null) { - properties().validate(); + public ManagementError error() { + return this.innerProperties() == null ? null : this.innerProperties().error(); + } + + /** + * Set the error property: The error detail. + * + * @param error the error value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withError(ManagementError error) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withError(error); + return this; + } + + /** + * Get the template property: The template content. You use this element when you want to pass the template syntax + * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. + * Use either the templateLink property or the template property, but not both. + * + * @return the template value. + */ + public Map template() { + return this.innerProperties() == null ? null : this.innerProperties().template(); + } + + /** + * Set the template property: The template content. You use this element when you want to pass the template syntax + * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. + * Use either the templateLink property or the template property, but not both. + * + * @param template the template value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withTemplate(Map template) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withTemplate(template); + return this; + } + + /** + * Get the templateLink property: The URI of the template. Use either the templateLink property or the template + * property, but not both. + * + * @return the templateLink value. + */ + public DeploymentStacksTemplateLink templateLink() { + return this.innerProperties() == null ? null : this.innerProperties().templateLink(); + } + + /** + * Set the templateLink property: The URI of the template. Use either the templateLink property or the template + * property, but not both. + * + * @param templateLink the templateLink value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withTemplateLink(DeploymentStacksTemplateLink templateLink) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withTemplateLink(templateLink); + return this; + } + + /** + * Get the parameters property: Name and value pairs that define the deployment parameters for the template. Use + * this element when providing the parameter values directly in the request, rather than linking to an existing + * parameter file. Use either the parametersLink property or the parameters property, but not both. + * + * @return the parameters value. + */ + public Map parameters() { + return this.innerProperties() == null ? null : this.innerProperties().parameters(); + } + + /** + * Set the parameters property: Name and value pairs that define the deployment parameters for the template. Use + * this element when providing the parameter values directly in the request, rather than linking to an existing + * parameter file. Use either the parametersLink property or the parameters property, but not both. + * + * @param parameters the parameters value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withParameters(Map parameters) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withParameters(parameters); + return this; + } + + /** + * Get the parametersLink property: The URI of parameters file. Use this element to link to an existing parameters + * file. Use either the parametersLink property or the parameters property, but not both. + * + * @return the parametersLink value. + */ + public DeploymentStacksParametersLink parametersLink() { + return this.innerProperties() == null ? null : this.innerProperties().parametersLink(); + } + + /** + * Set the parametersLink property: The URI of parameters file. Use this element to link to an existing parameters + * file. Use either the parametersLink property or the parameters property, but not both. + * + * @param parametersLink the parametersLink value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withParametersLink(DeploymentStacksParametersLink parametersLink) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withParametersLink(parametersLink); + return this; + } + + /** + * Get the extensionConfigs property: The deployment extension configs. Keys of this object are extension aliases as + * defined in the deployment template. + * + * @return the extensionConfigs value. + */ + public Map extensionConfigs() { + return this.innerProperties() == null ? null : this.innerProperties().extensionConfigs(); + } + + /** + * Set the extensionConfigs property: The deployment extension configs. Keys of this object are extension aliases as + * defined in the deployment template. + * + * @param extensionConfigs the extensionConfigs value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withExtensionConfigs(Map extensionConfigs) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withExtensionConfigs(extensionConfigs); + return this; + } + + /** + * Get the externalInputs property: External input values, used by external tooling for parameter evaluation. + * + * @return the externalInputs value. + */ + public Map externalInputs() { + return this.innerProperties() == null ? null : this.innerProperties().externalInputs(); + } + + /** + * Set the externalInputs property: External input values, used by external tooling for parameter evaluation. + * + * @param externalInputs the externalInputs value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withExternalInputs(Map externalInputs) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withExternalInputs(externalInputs); + return this; + } + + /** + * Get the externalInputDefinitions property: External input definitions, used by external tooling to define + * expected external input values. + * + * @return the externalInputDefinitions value. + */ + public Map externalInputDefinitions() { + return this.innerProperties() == null ? null : this.innerProperties().externalInputDefinitions(); + } + + /** + * Set the externalInputDefinitions property: External input definitions, used by external tooling to define + * expected external input values. + * + * @param externalInputDefinitions the externalInputDefinitions value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner + withExternalInputDefinitions(Map externalInputDefinitions) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withExternalInputDefinitions(externalInputDefinitions); + return this; + } + + /** + * Get the actionOnUnmanage property: Defines the behavior of resources that are no longer managed after the + * Deployment stack is updated or deleted. + * + * @return the actionOnUnmanage value. + */ + public ActionOnUnmanage actionOnUnmanage() { + return this.innerProperties() == null ? null : this.innerProperties().actionOnUnmanage(); + } + + /** + * Set the actionOnUnmanage property: Defines the behavior of resources that are no longer managed after the + * Deployment stack is updated or deleted. + * + * @param actionOnUnmanage the actionOnUnmanage value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withActionOnUnmanage(ActionOnUnmanage actionOnUnmanage) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); } + this.innerProperties().withActionOnUnmanage(actionOnUnmanage); + return this; + } + + /** + * Get the debugSetting property: The debug setting of the deployment. + * + * @return the debugSetting value. + */ + public DeploymentStacksDebugSetting debugSetting() { + return this.innerProperties() == null ? null : this.innerProperties().debugSetting(); + } + + /** + * Set the debugSetting property: The debug setting of the deployment. + * + * @param debugSetting the debugSetting value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withDebugSetting(DeploymentStacksDebugSetting debugSetting) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withDebugSetting(debugSetting); + return this; + } + + /** + * Get the deploymentScope property: The scope at which the initial deployment should be created. If a scope is not + * specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + * + * @return the deploymentScope value. + */ + public String deploymentScope() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentScope(); + } + + /** + * Set the deploymentScope property: The scope at which the initial deployment should be created. If a scope is not + * specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + * + * @param deploymentScope the deploymentScope value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withDeploymentScope(String deploymentScope) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withDeploymentScope(deploymentScope); + return this; + } + + /** + * Get the description property: Deployment stack description. Max length of 4096 characters. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: Deployment stack description. Max length of 4096 characters. + * + * @param description the description value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the denySettings property: Defines how resources deployed by the stack are locked. + * + * @return the denySettings value. + */ + public DenySettings denySettings() { + return this.innerProperties() == null ? null : this.innerProperties().denySettings(); + } + + /** + * Set the denySettings property: Defines how resources deployed by the stack are locked. + * + * @param denySettings the denySettings value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withDenySettings(DenySettings denySettings) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withDenySettings(denySettings); + return this; + } + + /** + * Get the provisioningState property: State of the deployment stack. + * + * @return the provisioningState value. + */ + public DeploymentStackProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the correlationId property: The correlation id of the last Deployment stack upsert or delete operation. It is + * in GUID format and is used for tracing. + * + * @return the correlationId value. + */ + public String correlationId() { + return this.innerProperties() == null ? null : this.innerProperties().correlationId(); + } + + /** + * Get the validationLevel property: The validation level of the deployment stack. + * + * @return the validationLevel value. + */ + public ValidationLevel validationLevel() { + return this.innerProperties() == null ? null : this.innerProperties().validationLevel(); + } + + /** + * Set the validationLevel property: The validation level of the deployment stack. + * + * @param validationLevel the validationLevel value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withValidationLevel(ValidationLevel validationLevel) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withValidationLevel(validationLevel); + return this; + } + + /** + * Get the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack resource list + * is not correctly synchronized. + * + * @return the bypassStackOutOfSyncError value. + */ + public Boolean bypassStackOutOfSyncError() { + return this.innerProperties() == null ? null : this.innerProperties().bypassStackOutOfSyncError(); + } + + /** + * Set the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack resource list + * is not correctly synchronized. + * + * @param bypassStackOutOfSyncError the bypassStackOutOfSyncError value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withBypassStackOutOfSyncError(Boolean bypassStackOutOfSyncError) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentStackProperties(); + } + this.innerProperties().withBypassStackOutOfSyncError(bypassStackOutOfSyncError); + return this; + } + + /** + * Get the detachedResources property: An array of resources that were detached during the most recent Deployment + * stack update. Detached means that the resource was removed from the template, but no relevant deletion operations + * were specified. So, the resource still exists while no longer being associated with the stack. + * + * @return the detachedResources value. + */ + public List detachedResources() { + return this.innerProperties() == null ? null : this.innerProperties().detachedResources(); + } + + /** + * Get the deletedResources property: An array of resources that were deleted during the most recent Deployment + * stack update. Deleted means that the resource was removed from the template and relevant deletion operations were + * specified. + * + * @return the deletedResources value. + */ + public List deletedResources() { + return this.innerProperties() == null ? null : this.innerProperties().deletedResources(); + } + + /** + * Get the failedResources property: An array of resources that failed to reach goal state during the most recent + * update. Each resourceId is accompanied by an error message. + * + * @return the failedResources value. + */ + public List failedResources() { + return this.innerProperties() == null ? null : this.innerProperties().failedResources(); + } + + /** + * Get the resources property: An array of resources currently managed by the deployment stack. + * + * @return the resources value. + */ + public List resources() { + return this.innerProperties() == null ? null : this.innerProperties().resources(); + } + + /** + * Get the deploymentExtensions property: The extensions used during deployment. Contains extension data for all + * extensible resources managed by the stack. + * + * @return the deploymentExtensions value. + */ + public List deploymentExtensions() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentExtensions(); + } + + /** + * Get the deploymentId property: The resourceId of the deployment resource created by the deployment stack. + * + * @return the deploymentId value. + */ + public String deploymentId() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentId(); + } + + /** + * Get the outputs property: The outputs of the deployment resource created by the deployment stack. + * + * @return the outputs value. + */ + public Map outputs() { + return this.innerProperties() == null ? null : this.innerProperties().outputs(); + } + + /** + * Get the duration property: The duration of the last successful Deployment stack update. + * + * @return the duration value. + */ + public String duration() { + return this.innerProperties() == null ? null : this.innerProperties().duration(); } /** @@ -181,9 +645,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeStringField("location", this.location); jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -209,15 +673,15 @@ public static DeploymentStackInner fromJson(JsonReader jsonReader) throws IOExce deserializedDeploymentStackInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedDeploymentStackInner.type = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedDeploymentStackInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedDeploymentStackInner.innerProperties = DeploymentStackProperties.fromJson(reader); } else if ("location".equals(fieldName)) { deserializedDeploymentStackInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedDeploymentStackInner.tags = tags; - } else if ("properties".equals(fieldName)) { - deserializedDeploymentStackInner.properties = DeploymentStackProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedDeploymentStackInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProperties.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackProperties.java similarity index 72% rename from sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProperties.java rename to sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackProperties.java index 5a4a96177211..f92bfb00a006 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProperties.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackProperties.java @@ -1,16 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.resources.deploymentstacks.models; +package com.azure.resourcemanager.resources.deploymentstacks.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtension; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInput; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInputDefinition; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProvisioningState; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDebugSetting; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksParametersLink; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import com.azure.resourcemanager.resources.deploymentstacks.models.ManagedResourceReference; +import com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReference; +import com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReferenceExtended; +import com.azure.resourcemanager.resources.deploymentstacks.models.ValidationLevel; import java.io.IOException; import java.util.List; import java.util.Map; @@ -20,12 +35,17 @@ */ @Fluent public final class DeploymentStackProperties implements JsonSerializable { + /* + * The error detail. + */ + private ManagementError error; + /* * The template content. You use this element when you want to pass the template syntax directly in the request * rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the * templateLink property or the template property, but not both. */ - private Object template; + private Map template; /* * The URI of the template. Use either the templateLink property or the template property, but not both. @@ -45,6 +65,22 @@ public final class DeploymentStackProperties implements JsonSerializable extensionConfigs; + + /* + * External input values, used by external tooling for parameter evaluation. + */ + private Map externalInputs; + + /* + * External input definitions, used by external tooling to define expected external input values. + */ + private Map externalInputDefinitions; + /* * Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted. */ @@ -55,11 +91,6 @@ public final class DeploymentStackProperties implements JsonSerializable resources; + /* + * The extensions used during deployment. Contains extension data for all extensible resources managed by the stack. + */ + private List deploymentExtensions; + /* * The resourceId of the deployment resource created by the deployment stack. */ @@ -122,24 +168,39 @@ public final class DeploymentStackProperties implements JsonSerializable outputs; /* * The duration of the last successful Deployment stack update. */ private String duration; - /* - * The error detail. - */ - private ManagementError error; - /** * Creates an instance of DeploymentStackProperties class. */ public DeploymentStackProperties() { } + /** + * Get the error property: The error detail. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Set the error property: The error detail. + * + * @param error the error value to set. + * @return the DeploymentStackProperties object itself. + */ + public DeploymentStackProperties withError(ManagementError error) { + this.error = error; + return this; + } + /** * Get the template property: The template content. You use this element when you want to pass the template syntax * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. @@ -147,7 +208,7 @@ public DeploymentStackProperties() { * * @return the template value. */ - public Object template() { + public Map template() { return this.template; } @@ -159,7 +220,7 @@ public Object template() { * @param template the template value to set. * @return the DeploymentStackProperties object itself. */ - public DeploymentStackProperties withTemplate(Object template) { + public DeploymentStackProperties withTemplate(Map template) { this.template = template; return this; } @@ -232,6 +293,71 @@ public DeploymentStackProperties withParametersLink(DeploymentStacksParametersLi return this; } + /** + * Get the extensionConfigs property: The deployment extension configs. Keys of this object are extension aliases as + * defined in the deployment template. + * + * @return the extensionConfigs value. + */ + public Map extensionConfigs() { + return this.extensionConfigs; + } + + /** + * Set the extensionConfigs property: The deployment extension configs. Keys of this object are extension aliases as + * defined in the deployment template. + * + * @param extensionConfigs the extensionConfigs value to set. + * @return the DeploymentStackProperties object itself. + */ + public DeploymentStackProperties withExtensionConfigs(Map extensionConfigs) { + this.extensionConfigs = extensionConfigs; + return this; + } + + /** + * Get the externalInputs property: External input values, used by external tooling for parameter evaluation. + * + * @return the externalInputs value. + */ + public Map externalInputs() { + return this.externalInputs; + } + + /** + * Set the externalInputs property: External input values, used by external tooling for parameter evaluation. + * + * @param externalInputs the externalInputs value to set. + * @return the DeploymentStackProperties object itself. + */ + public DeploymentStackProperties withExternalInputs(Map externalInputs) { + this.externalInputs = externalInputs; + return this; + } + + /** + * Get the externalInputDefinitions property: External input definitions, used by external tooling to define + * expected external input values. + * + * @return the externalInputDefinitions value. + */ + public Map externalInputDefinitions() { + return this.externalInputDefinitions; + } + + /** + * Set the externalInputDefinitions property: External input definitions, used by external tooling to define + * expected external input values. + * + * @param externalInputDefinitions the externalInputDefinitions value to set. + * @return the DeploymentStackProperties object itself. + */ + public DeploymentStackProperties + withExternalInputDefinitions(Map externalInputDefinitions) { + this.externalInputDefinitions = externalInputDefinitions; + return this; + } + /** * Get the actionOnUnmanage property: Defines the behavior of resources that are no longer managed after the * Deployment stack is updated or deleted. @@ -274,28 +400,6 @@ public DeploymentStackProperties withDebugSetting(DeploymentStacksDebugSetting d return this; } - /** - * Get the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack resource list - * is not correctly synchronized. - * - * @return the bypassStackOutOfSyncError value. - */ - public Boolean bypassStackOutOfSyncError() { - return this.bypassStackOutOfSyncError; - } - - /** - * Set the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack resource list - * is not correctly synchronized. - * - * @param bypassStackOutOfSyncError the bypassStackOutOfSyncError value to set. - * @return the DeploymentStackProperties object itself. - */ - public DeploymentStackProperties withBypassStackOutOfSyncError(Boolean bypassStackOutOfSyncError) { - this.bypassStackOutOfSyncError = bypassStackOutOfSyncError; - return this; - } - /** * Get the deploymentScope property: The scope at which the initial deployment should be created. If a scope is not * specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: @@ -383,6 +487,48 @@ public String correlationId() { return this.correlationId; } + /** + * Get the validationLevel property: The validation level of the deployment stack. + * + * @return the validationLevel value. + */ + public ValidationLevel validationLevel() { + return this.validationLevel; + } + + /** + * Set the validationLevel property: The validation level of the deployment stack. + * + * @param validationLevel the validationLevel value to set. + * @return the DeploymentStackProperties object itself. + */ + public DeploymentStackProperties withValidationLevel(ValidationLevel validationLevel) { + this.validationLevel = validationLevel; + return this; + } + + /** + * Get the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack resource list + * is not correctly synchronized. + * + * @return the bypassStackOutOfSyncError value. + */ + public Boolean bypassStackOutOfSyncError() { + return this.bypassStackOutOfSyncError; + } + + /** + * Set the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack resource list + * is not correctly synchronized. + * + * @param bypassStackOutOfSyncError the bypassStackOutOfSyncError value to set. + * @return the DeploymentStackProperties object itself. + */ + public DeploymentStackProperties withBypassStackOutOfSyncError(Boolean bypassStackOutOfSyncError) { + this.bypassStackOutOfSyncError = bypassStackOutOfSyncError; + return this; + } + /** * Get the detachedResources property: An array of resources that were detached during the most recent Deployment * stack update. Detached means that the resource was removed from the template, but no relevant deletion operations @@ -424,6 +570,16 @@ public List resources() { return this.resources; } + /** + * Get the deploymentExtensions property: The extensions used during deployment. Contains extension data for all + * extensible resources managed by the stack. + * + * @return the deploymentExtensions value. + */ + public List deploymentExtensions() { + return this.deploymentExtensions; + } + /** * Get the deploymentId property: The resourceId of the deployment resource created by the deployment stack. * @@ -438,7 +594,7 @@ public String deploymentId() { * * @return the outputs value. */ - public Object outputs() { + public Map outputs() { return this.outputs; } @@ -451,78 +607,6 @@ public String duration() { return this.duration; } - /** - * Get the error property: The error detail. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * Set the error property: The error detail. - * - * @param error the error value to set. - * @return the DeploymentStackProperties object itself. - */ - public DeploymentStackProperties withError(ManagementError error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (templateLink() != null) { - templateLink().validate(); - } - if (parameters() != null) { - parameters().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (parametersLink() != null) { - parametersLink().validate(); - } - if (actionOnUnmanage() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property actionOnUnmanage in model DeploymentStackProperties")); - } else { - actionOnUnmanage().validate(); - } - if (debugSetting() != null) { - debugSetting().validate(); - } - if (denySettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property denySettings in model DeploymentStackProperties")); - } else { - denySettings().validate(); - } - if (detachedResources() != null) { - detachedResources().forEach(e -> e.validate()); - } - if (deletedResources() != null) { - deletedResources().forEach(e -> e.validate()); - } - if (failedResources() != null) { - failedResources().forEach(e -> e.validate()); - } - if (resources() != null) { - resources().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DeploymentStackProperties.class); - /** * {@inheritDoc} */ @@ -531,17 +615,23 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("actionOnUnmanage", this.actionOnUnmanage); jsonWriter.writeJsonField("denySettings", this.denySettings); - if (this.template != null) { - jsonWriter.writeUntypedField("template", this.template); - } + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeMapField("template", this.template, + (writer, element) -> writer.writeUntyped(element == null ? null : element.toObject(Object.class))); jsonWriter.writeJsonField("templateLink", this.templateLink); jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("parametersLink", this.parametersLink); + jsonWriter.writeMapField("extensionConfigs", this.extensionConfigs, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeMapField("externalInputs", this.externalInputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeMapField("externalInputDefinitions", this.externalInputDefinitions, + (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("debugSetting", this.debugSetting); - jsonWriter.writeBooleanField("bypassStackOutOfSyncError", this.bypassStackOutOfSyncError); jsonWriter.writeStringField("deploymentScope", this.deploymentScope); jsonWriter.writeStringField("description", this.description); - jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeStringField("validationLevel", + this.validationLevel == null ? null : this.validationLevel.toString()); + jsonWriter.writeBooleanField("bypassStackOutOfSyncError", this.bypassStackOutOfSyncError); return jsonWriter.writeEndObject(); } @@ -565,8 +655,12 @@ public static DeploymentStackProperties fromJson(JsonReader jsonReader) throws I deserializedDeploymentStackProperties.actionOnUnmanage = ActionOnUnmanage.fromJson(reader); } else if ("denySettings".equals(fieldName)) { deserializedDeploymentStackProperties.denySettings = DenySettings.fromJson(reader); + } else if ("error".equals(fieldName)) { + deserializedDeploymentStackProperties.error = ManagementError.fromJson(reader); } else if ("template".equals(fieldName)) { - deserializedDeploymentStackProperties.template = reader.readUntyped(); + Map template = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedDeploymentStackProperties.template = template; } else if ("templateLink".equals(fieldName)) { deserializedDeploymentStackProperties.templateLink = DeploymentStacksTemplateLink.fromJson(reader); } else if ("parameters".equals(fieldName)) { @@ -576,11 +670,20 @@ public static DeploymentStackProperties fromJson(JsonReader jsonReader) throws I } else if ("parametersLink".equals(fieldName)) { deserializedDeploymentStackProperties.parametersLink = DeploymentStacksParametersLink.fromJson(reader); + } else if ("extensionConfigs".equals(fieldName)) { + Map extensionConfigs + = reader.readMap(reader1 -> DeploymentExtensionConfig.fromJson(reader1)); + deserializedDeploymentStackProperties.extensionConfigs = extensionConfigs; + } else if ("externalInputs".equals(fieldName)) { + Map externalInputs + = reader.readMap(reader1 -> DeploymentExternalInput.fromJson(reader1)); + deserializedDeploymentStackProperties.externalInputs = externalInputs; + } else if ("externalInputDefinitions".equals(fieldName)) { + Map externalInputDefinitions + = reader.readMap(reader1 -> DeploymentExternalInputDefinition.fromJson(reader1)); + deserializedDeploymentStackProperties.externalInputDefinitions = externalInputDefinitions; } else if ("debugSetting".equals(fieldName)) { deserializedDeploymentStackProperties.debugSetting = DeploymentStacksDebugSetting.fromJson(reader); - } else if ("bypassStackOutOfSyncError".equals(fieldName)) { - deserializedDeploymentStackProperties.bypassStackOutOfSyncError - = reader.getNullable(JsonReader::getBoolean); } else if ("deploymentScope".equals(fieldName)) { deserializedDeploymentStackProperties.deploymentScope = reader.getString(); } else if ("description".equals(fieldName)) { @@ -590,6 +693,12 @@ public static DeploymentStackProperties fromJson(JsonReader jsonReader) throws I = DeploymentStackProvisioningState.fromString(reader.getString()); } else if ("correlationId".equals(fieldName)) { deserializedDeploymentStackProperties.correlationId = reader.getString(); + } else if ("validationLevel".equals(fieldName)) { + deserializedDeploymentStackProperties.validationLevel + = ValidationLevel.fromString(reader.getString()); + } else if ("bypassStackOutOfSyncError".equals(fieldName)) { + deserializedDeploymentStackProperties.bypassStackOutOfSyncError + = reader.getNullable(JsonReader::getBoolean); } else if ("detachedResources".equals(fieldName)) { List detachedResources = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); @@ -606,14 +715,18 @@ public static DeploymentStackProperties fromJson(JsonReader jsonReader) throws I List resources = reader.readArray(reader1 -> ManagedResourceReference.fromJson(reader1)); deserializedDeploymentStackProperties.resources = resources; + } else if ("deploymentExtensions".equals(fieldName)) { + List deploymentExtensions + = reader.readArray(reader1 -> DeploymentExtension.fromJson(reader1)); + deserializedDeploymentStackProperties.deploymentExtensions = deploymentExtensions; } else if ("deploymentId".equals(fieldName)) { deserializedDeploymentStackProperties.deploymentId = reader.getString(); } else if ("outputs".equals(fieldName)) { - deserializedDeploymentStackProperties.outputs = reader.readUntyped(); + Map outputs = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedDeploymentStackProperties.outputs = outputs; } else if ("duration".equals(fieldName)) { deserializedDeploymentStackProperties.duration = reader.getString(); - } else if ("error".equals(fieldName)) { - deserializedDeploymentStackProperties.error = ManagementError.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackTemplateDefinitionInner.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackTemplateDefinitionInner.java index 88ffb4c6fc2a..b361ecadf067 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackTemplateDefinitionInner.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackTemplateDefinitionInner.java @@ -1,16 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; import java.io.IOException; +import java.util.Map; /** * Export Template specific properties of the Deployment stack. @@ -23,7 +25,7 @@ public final class DeploymentStackTemplateDefinitionInner * existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the * template property, but not both. */ - private Object template; + private Map template; /* * The URI of the template. Use either the templateLink property or the template property, but not both. @@ -43,7 +45,7 @@ private DeploymentStackTemplateDefinitionInner() { * * @return the template value. */ - public Object template() { + public Map template() { return this.template; } @@ -57,26 +59,14 @@ public DeploymentStacksTemplateLink templateLink() { return this.templateLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (templateLink() != null) { - templateLink().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - if (this.template != null) { - jsonWriter.writeUntypedField("template", this.template); - } + jsonWriter.writeMapField("template", this.template, + (writer, element) -> writer.writeUntyped(element == null ? null : element.toObject(Object.class))); jsonWriter.writeJsonField("templateLink", this.templateLink); return jsonWriter.writeEndObject(); } @@ -98,7 +88,9 @@ public static DeploymentStackTemplateDefinitionInner fromJson(JsonReader jsonRea reader.nextToken(); if ("template".equals(fieldName)) { - deserializedDeploymentStackTemplateDefinitionInner.template = reader.readUntyped(); + Map template = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedDeploymentStackTemplateDefinitionInner.template = template; } else if ("templateLink".equals(fieldName)) { deserializedDeploymentStackTemplateDefinitionInner.templateLink = DeploymentStacksTemplateLink.fromJson(reader); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackValidateResultInner.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackValidateResultInner.java index c61c7729af99..6ce3cc1886ce 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackValidateResultInner.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackValidateResultInner.java @@ -1,98 +1,85 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.SystemData; import com.azure.core.management.exception.ManagementError; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.resources.deploymentstacks.models.AzureResourceBase; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackValidateProperties; import java.io.IOException; /** * The Deployment stack validation result. */ -@Fluent -public final class DeploymentStackValidateResultInner extends AzureResourceBase { +@Immutable +public final class DeploymentStackValidateResultInner implements JsonSerializable { /* - * The validation result details. + * String Id used to locate any resource on Azure. */ - private DeploymentStackValidateProperties properties; + private String id; /* - * The error detail. + * Name of this resource. */ - private ManagementError error; + private String name; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Type of this resource. */ - private SystemData systemData; + private String type; /* - * The type of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private String type; + private SystemData systemData; /* - * The name of the resource. + * The error detail. */ - private String name; + private ManagementError error; /* - * Fully qualified resource Id for the resource. + * The validation result details. */ - private String id; + private DeploymentStackValidateProperties properties; /** * Creates an instance of DeploymentStackValidateResultInner class. */ - public DeploymentStackValidateResultInner() { + private DeploymentStackValidateResultInner() { } /** - * Get the properties property: The validation result details. + * Get the id property: String Id used to locate any resource on Azure. * - * @return the properties value. + * @return the id value. */ - public DeploymentStackValidateProperties properties() { - return this.properties; + public String id() { + return this.id; } /** - * Set the properties property: The validation result details. + * Get the name property: Name of this resource. * - * @param properties the properties value to set. - * @return the DeploymentStackValidateResultInner object itself. - */ - public DeploymentStackValidateResultInner withProperties(DeploymentStackValidateProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the error property: The error detail. - * - * @return the error value. + * @return the name value. */ - public ManagementError error() { - return this.error; + public String name() { + return this.name; } /** - * Set the error property: The error detail. + * Get the type property: Type of this resource. * - * @param error the error value to set. - * @return the DeploymentStackValidateResultInner object itself. + * @return the type value. */ - public DeploymentStackValidateResultInner withError(ManagementError error) { - this.error = error; - return this; + public String type() { + return this.type; } /** @@ -100,51 +87,26 @@ public DeploymentStackValidateResultInner withError(ManagementError error) { * * @return the systemData value. */ - @Override public SystemData systemData() { return this.systemData; } /** - * 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. + * Get the error property: The error detail. * - * @return the id value. + * @return the error value. */ - @Override - public String id() { - return this.id; + public ManagementError error() { + return this.error; } /** - * Validates the instance. + * Get the properties property: The validation result details. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the properties value. */ - @Override - public void validate() { - if (properties() != null) { - properties().validate(); - } + public DeploymentStackValidateProperties properties() { + return this.properties; } /** @@ -153,8 +115,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -164,7 +126,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DeploymentStackValidateResultInner 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 DeploymentStackValidateResultInner. */ public static DeploymentStackValidateResultInner fromJson(JsonReader jsonReader) throws IOException { @@ -183,11 +144,11 @@ public static DeploymentStackValidateResultInner fromJson(JsonReader jsonReader) deserializedDeploymentStackValidateResultInner.type = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedDeploymentStackValidateResultInner.systemData = SystemData.fromJson(reader); + } else if ("error".equals(fieldName)) { + deserializedDeploymentStackValidateResultInner.error = ManagementError.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedDeploymentStackValidateResultInner.properties = DeploymentStackValidateProperties.fromJson(reader); - } else if ("error".equals(fieldName)) { - deserializedDeploymentStackValidateResultInner.error = ManagementError.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStacksWhatIfResultInner.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStacksWhatIfResultInner.java new file mode 100644 index 000000000000..0eeb15c0a51f --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStacksWhatIfResultInner.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; +import java.io.IOException; +import java.util.Map; + +/** + * Deployment stack object. + */ +@Fluent +public final class DeploymentStacksWhatIfResultInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private DeploymentStacksWhatIfResultProperties properties; + + /* + * The geo-location where the resource lives. Required for subscription and management group scoped stacks. The + * location is inherited from the resource group for resource group scoped stacks. + */ + private String location; + + /* + * Resource tags. + */ + private Map tags; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * 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 DeploymentStacksWhatIfResultInner class. + */ + public DeploymentStacksWhatIfResultInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public DeploymentStacksWhatIfResultProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the DeploymentStacksWhatIfResultInner object itself. + */ + public DeploymentStacksWhatIfResultInner withProperties(DeploymentStacksWhatIfResultProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. Required for subscription and management + * group scoped stacks. The location is inherited from the resource group for resource group scoped stacks. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. Required for subscription and management + * group scoped stacks. The location is inherited from the resource group for resource group scoped stacks. + * + * @param location the location value to set. + * @return the DeploymentStacksWhatIfResultInner object itself. + */ + public DeploymentStacksWhatIfResultInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the DeploymentStacksWhatIfResultInner object itself. + */ + public DeploymentStacksWhatIfResultInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * 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 JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksWhatIfResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksWhatIfResultInner 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 DeploymentStacksWhatIfResultInner. + */ + public static DeploymentStacksWhatIfResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksWhatIfResultInner deserializedDeploymentStacksWhatIfResultInner + = new DeploymentStacksWhatIfResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultInner.properties + = DeploymentStacksWhatIfResultProperties.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultInner.location = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDeploymentStacksWhatIfResultInner.tags = tags; + } else if ("systemData".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksWhatIfResultInner; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/package-info.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/package-info.java index 2ccaced8cf12..e8a9d1bc4b49 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/package-info.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/package-info.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the inner data models for DeploymentStacksManagementClient. - * DeploymentStacks Client. + * The APIs listed in this specification can be used to manage Deployment stack resources through the Azure Resource + * Manager. */ package com.azure.resourcemanager.resources.deploymentstacks.fluent.models; diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/package-info.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/package-info.java index 3ee1735c3b97..29932bf864c2 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/package-info.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/package-info.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the service clients for DeploymentStacksManagementClient. - * DeploymentStacks Client. + * The APIs listed in this specification can be used to manage Deployment stack resources through the Azure Resource + * Manager. */ package com.azure.resourcemanager.resources.deploymentstacks.fluent; diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackImpl.java index 528d85a36128..0b8e3ca38214 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackImpl.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackImpl.java @@ -1,19 +1,36 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.implementation; import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.management.SystemData; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; +import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtension; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInput; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInputDefinition; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStack; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProvisioningState; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackTemplateDefinition; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackValidateResult; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDebugSetting; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksParametersLink; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import com.azure.resourcemanager.resources.deploymentstacks.models.ManagedResourceReference; +import com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReference; +import com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReferenceExtended; +import com.azure.resourcemanager.resources.deploymentstacks.models.ValidationLevel; import java.util.Collections; +import java.util.List; import java.util.Map; public final class DeploymentStackImpl implements DeploymentStack, DeploymentStack.Definition, DeploymentStack.Update { @@ -33,10 +50,6 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public String location() { return this.innerModel().location(); } @@ -50,8 +63,163 @@ public Map tags() { } } - public DeploymentStackProperties properties() { - return this.innerModel().properties(); + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public Map template() { + Map inner = this.innerModel().template(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public DeploymentStacksTemplateLink templateLink() { + return this.innerModel().templateLink(); + } + + public Map parameters() { + Map inner = this.innerModel().parameters(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public DeploymentStacksParametersLink parametersLink() { + return this.innerModel().parametersLink(); + } + + public Map extensionConfigs() { + Map inner = this.innerModel().extensionConfigs(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Map externalInputs() { + Map inner = this.innerModel().externalInputs(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Map externalInputDefinitions() { + Map inner = this.innerModel().externalInputDefinitions(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ActionOnUnmanage actionOnUnmanage() { + return this.innerModel().actionOnUnmanage(); + } + + public DeploymentStacksDebugSetting debugSetting() { + return this.innerModel().debugSetting(); + } + + public String deploymentScope() { + return this.innerModel().deploymentScope(); + } + + public String description() { + return this.innerModel().description(); + } + + public DenySettings denySettings() { + return this.innerModel().denySettings(); + } + + public DeploymentStackProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String correlationId() { + return this.innerModel().correlationId(); + } + + public ValidationLevel validationLevel() { + return this.innerModel().validationLevel(); + } + + public Boolean bypassStackOutOfSyncError() { + return this.innerModel().bypassStackOutOfSyncError(); + } + + public List detachedResources() { + List inner = this.innerModel().detachedResources(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List deletedResources() { + List inner = this.innerModel().deletedResources(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List failedResources() { + List inner = this.innerModel().failedResources(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List resources() { + List inner = this.innerModel().resources(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List deploymentExtensions() { + List inner = this.innerModel().deploymentExtensions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String deploymentId() { + return this.innerModel().deploymentId(); + } + + public Map outputs() { + Map inner = this.innerModel().outputs(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String duration() { + return this.innerModel().duration(); } public Region region() { @@ -146,15 +314,6 @@ public DeploymentStack refresh(Context context) { return this; } - public Response exportTemplateAtResourceGroupWithResponse(Context context) { - return serviceManager.deploymentStacks() - .exportTemplateAtResourceGroupWithResponse(resourceGroupName, deploymentStackName, context); - } - - public DeploymentStackTemplateDefinition exportTemplateAtResourceGroup() { - return serviceManager.deploymentStacks().exportTemplateAtResourceGroup(resourceGroupName, deploymentStackName); - } - public DeploymentStackValidateResult validateStackAtResourceGroup(DeploymentStackInner deploymentStack) { return serviceManager.deploymentStacks() .validateStackAtResourceGroup(resourceGroupName, deploymentStackName, deploymentStack); @@ -166,6 +325,15 @@ public DeploymentStackValidateResult validateStackAtResourceGroup(DeploymentStac .validateStackAtResourceGroup(resourceGroupName, deploymentStackName, deploymentStack, context); } + public Response exportTemplateAtResourceGroupWithResponse(Context context) { + return serviceManager.deploymentStacks() + .exportTemplateAtResourceGroupWithResponse(resourceGroupName, deploymentStackName, context); + } + + public DeploymentStackTemplateDefinition exportTemplateAtResourceGroup() { + return serviceManager.deploymentStacks().exportTemplateAtResourceGroup(resourceGroupName, deploymentStackName); + } + public DeploymentStackImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -181,8 +349,79 @@ public DeploymentStackImpl withTags(Map tags) { return this; } - public DeploymentStackImpl withProperties(DeploymentStackProperties properties) { - this.innerModel().withProperties(properties); + public DeploymentStackImpl withError(ManagementError error) { + this.innerModel().withError(error); + return this; + } + + public DeploymentStackImpl withTemplate(Map template) { + this.innerModel().withTemplate(template); + return this; + } + + public DeploymentStackImpl withTemplateLink(DeploymentStacksTemplateLink templateLink) { + this.innerModel().withTemplateLink(templateLink); + return this; + } + + public DeploymentStackImpl withParameters(Map parameters) { + this.innerModel().withParameters(parameters); + return this; + } + + public DeploymentStackImpl withParametersLink(DeploymentStacksParametersLink parametersLink) { + this.innerModel().withParametersLink(parametersLink); + return this; + } + + public DeploymentStackImpl withExtensionConfigs(Map extensionConfigs) { + this.innerModel().withExtensionConfigs(extensionConfigs); + return this; + } + + public DeploymentStackImpl withExternalInputs(Map externalInputs) { + this.innerModel().withExternalInputs(externalInputs); + return this; + } + + public DeploymentStackImpl + withExternalInputDefinitions(Map externalInputDefinitions) { + this.innerModel().withExternalInputDefinitions(externalInputDefinitions); + return this; + } + + public DeploymentStackImpl withActionOnUnmanage(ActionOnUnmanage actionOnUnmanage) { + this.innerModel().withActionOnUnmanage(actionOnUnmanage); + return this; + } + + public DeploymentStackImpl withDebugSetting(DeploymentStacksDebugSetting debugSetting) { + this.innerModel().withDebugSetting(debugSetting); + return this; + } + + public DeploymentStackImpl withDeploymentScope(String deploymentScope) { + this.innerModel().withDeploymentScope(deploymentScope); + return this; + } + + public DeploymentStackImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public DeploymentStackImpl withDenySettings(DenySettings denySettings) { + this.innerModel().withDenySettings(denySettings); + return this; + } + + public DeploymentStackImpl withValidationLevel(ValidationLevel validationLevel) { + this.innerModel().withValidationLevel(validationLevel); + return this; + } + + public DeploymentStackImpl withBypassStackOutOfSyncError(Boolean bypassStackOutOfSyncError) { + this.innerModel().withBypassStackOutOfSyncError(bypassStackOutOfSyncError); return this; } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackTemplateDefinitionImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackTemplateDefinitionImpl.java index 5a3f06c3cb57..99e97c50324f 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackTemplateDefinitionImpl.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackTemplateDefinitionImpl.java @@ -1,12 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.implementation; +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackTemplateDefinitionInner; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackTemplateDefinition; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import java.util.Collections; +import java.util.Map; public final class DeploymentStackTemplateDefinitionImpl implements DeploymentStackTemplateDefinition { private DeploymentStackTemplateDefinitionInner innerObject; @@ -19,8 +22,13 @@ public final class DeploymentStackTemplateDefinitionImpl implements DeploymentSt this.serviceManager = serviceManager; } - public Object template() { - return this.innerModel().template(); + public Map template() { + Map inner = this.innerModel().template(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } } public DeploymentStacksTemplateLink templateLink() { diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackValidateResultImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackValidateResultImpl.java index d19cbdfb11cb..fa2d81167261 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackValidateResultImpl.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackValidateResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.implementation; @@ -37,14 +37,14 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public DeploymentStackValidateProperties properties() { - return this.innerModel().properties(); - } - public ManagementError error() { return this.innerModel().error(); } + public DeploymentStackValidateProperties properties() { + return this.innerModel().properties(); + } + public DeploymentStackValidateResultInner innerModel() { return this.innerObject; } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksClientImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksClientImpl.java index 2de3fa1c098e..31e702a0cea7 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.implementation; @@ -31,17 +31,15 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackTemplateDefinitionInner; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackValidateResultInner; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackListResult; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionManagementGroupMode; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionResourceGroupMode; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionResourceMode; +import com.azure.resourcemanager.resources.deploymentstacks.implementation.models.DeploymentStackListResult; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -75,373 +73,367 @@ public final class DeploymentStacksClientImpl implements DeploymentStacksClient * The interface defining all the services for DeploymentStacksManagementClientDeploymentStacks to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "DeploymentStacksManagementClientDeploymentStacks") public interface DeploymentStacksService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStackName") String deploymentStackName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStackName") String deploymentStackName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks") - @ExpectedResponses({ 200 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate") + @ExpectedResponses({ 200, 202, 400 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAtManagementGroup(@HostParam("$host") String endpoint, - @PathParam("managementGroupId") String managementGroupId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Mono>> validateStackAtResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStackName") String deploymentStackName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStackInner deploymentStack, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks") - @ExpectedResponses({ 200 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate") + @ExpectedResponses({ 200, 202, 400 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listAtManagementGroupSync(@HostParam("$host") String endpoint, - @PathParam("managementGroupId") String managementGroupId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response validateStackAtResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStackName") String deploymentStackName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStackInner deploymentStack, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdateAtResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdateAtResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentStackInner deploymentStack, @HeaderParam("Accept") String accept, - Context context); + @PathParam("deploymentStackName") String deploymentStackName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStackInner deploymentStack, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateAtResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateAtResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentStackInner deploymentStack, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("deploymentStackName") String deploymentStackName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStackInner deploymentStack, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("deploymentStackName") String deploymentStackName, - @QueryParam("unmanageAction.Resources") UnmanageActionResourceMode unmanageActionResources, - @QueryParam("unmanageAction.ResourceGroups") UnmanageActionResourceGroupMode unmanageActionResourceGroups, - @QueryParam("unmanageAction.ManagementGroups") UnmanageActionManagementGroupMode unmanageActionManagementGroups, - @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @QueryParam("unmanageAction.Resources") DeploymentStacksDeleteDetachEnum unmanageActionResources, + @QueryParam("unmanageAction.ResourceGroups") DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + @QueryParam("unmanageAction.ManagementGroups") DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + @QueryParam("unmanageAction.ResourcesWithoutDeleteSupport") DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("deploymentStackName") String deploymentStackName, - @QueryParam("unmanageAction.Resources") UnmanageActionResourceMode unmanageActionResources, - @QueryParam("unmanageAction.ResourceGroups") UnmanageActionResourceGroupMode unmanageActionResourceGroups, - @QueryParam("unmanageAction.ManagementGroups") UnmanageActionManagementGroupMode unmanageActionManagementGroups, - @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @QueryParam("unmanageAction.Resources") DeploymentStacksDeleteDetachEnum unmanageActionResources, + @QueryParam("unmanageAction.ResourceGroups") DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + @QueryParam("unmanageAction.ManagementGroups") DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + @QueryParam("unmanageAction.ResourcesWithoutDeleteSupport") DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") - @ExpectedResponses({ 200, 201 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdateAtSubscription(@HostParam("$host") String endpoint, + Mono> exportTemplateAtResourceGroup( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentStackInner deploymentStack, @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStackName") String deploymentStackName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") - @ExpectedResponses({ 200, 201 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateAtSubscriptionSync(@HostParam("$host") String endpoint, + Response exportTemplateAtResourceGroupSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentStackInner deploymentStack, @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStackName") String deploymentStackName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getAtSubscription(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Mono> getAtSubscription(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStackName") String deploymentStackName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getAtSubscriptionSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response getAtSubscriptionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStackName") String deploymentStackName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteAtSubscription(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("deploymentStackName") String deploymentStackName, - @QueryParam("unmanageAction.Resources") UnmanageActionResourceMode unmanageActionResources, - @QueryParam("unmanageAction.ResourceGroups") UnmanageActionResourceGroupMode unmanageActionResourceGroups, - @QueryParam("unmanageAction.ManagementGroups") UnmanageActionManagementGroupMode unmanageActionManagementGroups, - @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteAtSubscriptionSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("deploymentStackName") String deploymentStackName, - @QueryParam("unmanageAction.Resources") UnmanageActionResourceMode unmanageActionResources, - @QueryParam("unmanageAction.ResourceGroups") UnmanageActionResourceGroupMode unmanageActionResourceGroups, - @QueryParam("unmanageAction.ManagementGroups") UnmanageActionManagementGroupMode unmanageActionManagementGroups, - @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") - @ExpectedResponses({ 200, 201 }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate") + @ExpectedResponses({ 200, 202, 400 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdateAtManagementGroup(@HostParam("$host") String endpoint, - @PathParam("managementGroupId") String managementGroupId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentStackInner deploymentStack, @HeaderParam("Accept") String accept, - Context context); + Mono>> validateStackAtSubscription(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStackName") String deploymentStackName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStackInner deploymentStack, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") - @ExpectedResponses({ 200, 201 }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate") + @ExpectedResponses({ 200, 202, 400 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateAtManagementGroupSync(@HostParam("$host") String endpoint, - @PathParam("managementGroupId") String managementGroupId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentStackInner deploymentStack, @HeaderParam("Accept") String accept, - Context context); + Response validateStackAtSubscriptionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStackName") String deploymentStackName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStackInner deploymentStack, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getAtManagementGroup(@HostParam("$host") String endpoint, - @PathParam("managementGroupId") String managementGroupId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Mono>> createOrUpdateAtSubscription(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStackName") String deploymentStackName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStackInner deploymentStack, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getAtManagementGroupSync(@HostParam("$host") String endpoint, - @PathParam("managementGroupId") String managementGroupId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response createOrUpdateAtSubscriptionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStackName") String deploymentStackName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStackInner deploymentStack, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteAtManagementGroup(@HostParam("$host") String endpoint, - @PathParam("managementGroupId") String managementGroupId, + Mono>> deleteAtSubscription(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("deploymentStackName") String deploymentStackName, - @QueryParam("unmanageAction.Resources") UnmanageActionResourceMode unmanageActionResources, - @QueryParam("unmanageAction.ResourceGroups") UnmanageActionResourceGroupMode unmanageActionResourceGroups, - @QueryParam("unmanageAction.ManagementGroups") UnmanageActionManagementGroupMode unmanageActionManagementGroups, - @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @QueryParam("unmanageAction.Resources") DeploymentStacksDeleteDetachEnum unmanageActionResources, + @QueryParam("unmanageAction.ResourceGroups") DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + @QueryParam("unmanageAction.ManagementGroups") DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + @QueryParam("unmanageAction.ResourcesWithoutDeleteSupport") DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteAtManagementGroupSync(@HostParam("$host") String endpoint, - @PathParam("managementGroupId") String managementGroupId, + Response deleteAtSubscriptionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("deploymentStackName") String deploymentStackName, - @QueryParam("unmanageAction.Resources") UnmanageActionResourceMode unmanageActionResources, - @QueryParam("unmanageAction.ResourceGroups") UnmanageActionResourceGroupMode unmanageActionResourceGroups, - @QueryParam("unmanageAction.ManagementGroups") UnmanageActionManagementGroupMode unmanageActionManagementGroups, - @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @QueryParam("unmanageAction.Resources") DeploymentStacksDeleteDetachEnum unmanageActionResources, + @QueryParam("unmanageAction.ResourceGroups") DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + @QueryParam("unmanageAction.ManagementGroups") DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + @QueryParam("unmanageAction.ResourcesWithoutDeleteSupport") DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate") + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> exportTemplateAtResourceGroup( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Mono> exportTemplateAtSubscription( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStackName") String deploymentStackName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate") + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response exportTemplateAtResourceGroupSync( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response exportTemplateAtSubscriptionSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStackName") String deploymentStackName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate") + @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> exportTemplateAtSubscription( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Mono> getAtManagementGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStackName") String deploymentStackName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate") + @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response exportTemplateAtSubscriptionSync( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response getAtManagementGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStackName") String deploymentStackName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate") + @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> exportTemplateAtManagementGroup( - @HostParam("$host") String endpoint, @PathParam("managementGroupId") String managementGroupId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, + Mono> listAtManagementGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate") + @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response exportTemplateAtManagementGroupSync( - @HostParam("$host") String endpoint, @PathParam("managementGroupId") String managementGroupId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, + Response listAtManagementGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate") + @Post("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate") @ExpectedResponses({ 200, 202, 400 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateStackAtResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentStackInner deploymentStack, @HeaderParam("Accept") String accept, - Context context); + Mono>> validateStackAtManagementGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStackName") String deploymentStackName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStackInner deploymentStack, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate") + @Post("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate") @ExpectedResponses({ 200, 202, 400 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response validateStackAtResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentStackInner deploymentStack, @HeaderParam("Accept") String accept, - Context context); + Response validateStackAtManagementGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStackName") String deploymentStackName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStackInner deploymentStack, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate") - @ExpectedResponses({ 200, 202, 400 }) + @Put("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateStackAtSubscription(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentStackInner deploymentStack, @HeaderParam("Accept") String accept, - Context context); + Mono>> createOrUpdateAtManagementGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStackName") String deploymentStackName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStackInner deploymentStack, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate") - @ExpectedResponses({ 200, 202, 400 }) + @Put("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response validateStackAtSubscriptionSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentStackInner deploymentStack, @HeaderParam("Accept") String accept, - Context context); + Response createOrUpdateAtManagementGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStackName") String deploymentStackName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStackInner deploymentStack, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteAtManagementGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStackName") String deploymentStackName, + @QueryParam("unmanageAction.Resources") DeploymentStacksDeleteDetachEnum unmanageActionResources, + @QueryParam("unmanageAction.ResourceGroups") DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + @QueryParam("unmanageAction.ManagementGroups") DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + @QueryParam("unmanageAction.ResourcesWithoutDeleteSupport") DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteAtManagementGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStackName") String deploymentStackName, + @QueryParam("unmanageAction.Resources") DeploymentStacksDeleteDetachEnum unmanageActionResources, + @QueryParam("unmanageAction.ResourceGroups") DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + @QueryParam("unmanageAction.ManagementGroups") DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + @QueryParam("unmanageAction.ResourcesWithoutDeleteSupport") DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate") - @ExpectedResponses({ 200, 202, 400 }) + @Post("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateStackAtManagementGroup(@HostParam("$host") String endpoint, + Mono> exportTemplateAtManagementGroup( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentStackInner deploymentStack, @HeaderParam("Accept") String accept, + @PathParam("deploymentStackName") String deploymentStackName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate") - @ExpectedResponses({ 200, 202, 400 }) + @Post("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response validateStackAtManagementGroupSync(@HostParam("$host") String endpoint, + Response exportTemplateAtManagementGroupSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, - @PathParam("deploymentStackName") String deploymentStackName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentStackInner deploymentStack, @HeaderParam("Accept") String accept, + @PathParam("deploymentStackName") String deploymentStackName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -449,7 +441,7 @@ Response validateStackAtManagementGroupSync(@HostParam("$host") Stri @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAtResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -457,7 +449,7 @@ Mono> listAtResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listAtResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -465,7 +457,7 @@ Response listAtResourceGroupNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAtSubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -473,7 +465,7 @@ Mono> listAtSubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listAtSubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -481,7 +473,7 @@ Response listAtSubscriptionNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAtManagementGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -489,50 +481,110 @@ Mono> listAtManagementGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listAtManagementGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists all the Deployment stacks within the specified Resource Group. + * Gets the Deployment stack with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String deploymentStackName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the Deployment stack with the given name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the Deployment stack with the given name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String deploymentStackName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, deploymentStackName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String deploymentStackName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, accept, context); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStackInner getByResourceGroup(String resourceGroupName, String deploymentStackName) { + return getByResourceGroupWithResponse(resourceGroupName, deploymentStackName, Context.NONE).getValue(); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - 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.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); } /** - * Lists all the Deployment stacks within the specified Resource Group. + * Lists Deployment stacks at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedFlux}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -541,79 +593,51 @@ private PagedFlux listByResourceGroupAsync(String resource } /** - * Lists all the Deployment stacks within the specified Resource Group. + * Lists Deployment stacks at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, Context.NONE); + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Lists all the Deployment stacks within the specified Resource Group. + * Lists Deployment stacks at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context); + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Lists all the Deployment stacks within the specified Resource Group. + * Lists Deployment stacks at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -622,14 +646,14 @@ public PagedIterable listByResourceGroup(String resourceGr } /** - * Lists all the Deployment stacks within the specified Resource Group. + * Lists Deployment stacks at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -638,261 +662,206 @@ public PagedIterable listByResourceGroup(String resourceGr } /** - * Lists all the Deployment stacks within the specified Subscription. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - 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.")); - } + private Mono>> validateStackAtResourceGroupWithResponseAsync(String resourceGroupName, + String deploymentStackName, DeploymentStackInner deploymentStack) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.validateStackAtResourceGroup(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, + contentType, accept, deploymentStack, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all the Deployment stacks within the specified Subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listAtSubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the Deployment stacks within the specified Subscription. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Response validateStackAtResourceGroupWithResponse(String resourceGroupName, + String deploymentStackName, DeploymentStackInner deploymentStack) { + final String contentType = "application/json"; final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return service.validateStackAtResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, contentType, accept, + deploymentStack, Context.NONE); } /** - * Lists all the Deployment stacks within the specified Subscription. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Response validateStackAtResourceGroupWithResponse(String resourceGroupName, + String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists all the Deployment stacks within the specified Subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listAtSubscriptionNextSinglePage(nextLink)); + return service.validateStackAtResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, contentType, accept, + deploymentStack, context); } /** - * Lists all the Deployment stacks within the specified Subscription. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), - nextLink -> listAtSubscriptionNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DeploymentStackValidateResultInner> + beginValidateStackAtResourceGroupAsync(String resourceGroupName, String deploymentStackName, + DeploymentStackInner deploymentStack) { + Mono>> mono + = validateStackAtResourceGroupWithResponseAsync(resourceGroupName, deploymentStackName, deploymentStack); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DeploymentStackValidateResultInner.class, + DeploymentStackValidateResultInner.class, this.client.getContext()); } /** - * Lists all the Deployment stacks within the specified Management Group. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * - * @param managementGroupId Management Group id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAtManagementGroupSinglePageAsync(String managementGroupId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - return Mono - .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listAtManagementGroup(this.client.getEndpoint(), managementGroupId, - this.client.getApiVersion(), 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())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DeploymentStackValidateResultInner> + beginValidateStackAtResourceGroup(String resourceGroupName, String deploymentStackName, + DeploymentStackInner deploymentStack) { + Response response + = validateStackAtResourceGroupWithResponse(resourceGroupName, deploymentStackName, deploymentStack); + return this.client.getLroResult( + response, DeploymentStackValidateResultInner.class, DeploymentStackValidateResultInner.class, Context.NONE); } /** - * Lists all the Deployment stacks within the specified Management Group. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * - * @param managementGroupId Management Group id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAtManagementGroupAsync(String managementGroupId) { - return new PagedFlux<>(() -> listAtManagementGroupSinglePageAsync(managementGroupId), - nextLink -> listAtManagementGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DeploymentStackValidateResultInner> + beginValidateStackAtResourceGroup(String resourceGroupName, String deploymentStackName, + DeploymentStackInner deploymentStack, Context context) { + Response response = validateStackAtResourceGroupWithResponse(resourceGroupName, deploymentStackName, + deploymentStack, context); + return this.client.getLroResult( + response, DeploymentStackValidateResultInner.class, DeploymentStackValidateResultInner.class, context); } /** - * Lists all the Deployment stacks within the specified Management Group. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * - * @param managementGroupId Management Group id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAtManagementGroupSinglePage(String managementGroupId) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listAtManagementGroupSync(this.client.getEndpoint(), - managementGroupId, this.client.getApiVersion(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + private Mono validateStackAtResourceGroupAsync(String resourceGroupName, + String deploymentStackName, DeploymentStackInner deploymentStack) { + return beginValidateStackAtResourceGroupAsync(resourceGroupName, deploymentStackName, deploymentStack).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Lists all the Deployment stacks within the specified Management Group. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * - * @param managementGroupId Management Group id. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAtManagementGroupSinglePage(String managementGroupId, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listAtManagementGroupSync(this.client.getEndpoint(), - managementGroupId, this.client.getApiVersion(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists all the Deployment stacks within the specified Management Group. - * - * @param managementGroupId Management Group id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAtManagementGroup(String managementGroupId) { - return new PagedIterable<>(() -> listAtManagementGroupSinglePage(managementGroupId), - nextLink -> listAtManagementGroupNextSinglePage(nextLink)); + public DeploymentStackValidateResultInner validateStackAtResourceGroup(String resourceGroupName, + String deploymentStackName, DeploymentStackInner deploymentStack) { + return beginValidateStackAtResourceGroup(resourceGroupName, deploymentStackName, deploymentStack) + .getFinalResult(); } /** - * Lists all the Deployment stacks within the specified Management Group. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * - * @param managementGroupId Management Group id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAtManagementGroup(String managementGroupId, Context context) { - return new PagedIterable<>(() -> listAtManagementGroupSinglePage(managementGroupId, context), - nextLink -> listAtManagementGroupNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStackValidateResultInner validateStackAtResourceGroup(String resourceGroupName, + String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { + return beginValidateStackAtResourceGroup(resourceGroupName, deploymentStackName, deploymentStack, context) + .getFinalResult(); } /** - * Creates or updates a Deployment stack at Resource Group scope. + * Creates or updates a Deployment stack at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -901,42 +870,21 @@ public PagedIterable listAtManagementGroup(String manageme @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateAtResourceGroupWithResponseAsync(String resourceGroupName, String deploymentStackName, DeploymentStackInner deploymentStack) { - 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 (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdateAtResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, this.client.getApiVersion(), - deploymentStack, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, + contentType, accept, deploymentStack, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a Deployment stack at Resource Group scope. + * Creates or updates a Deployment stack at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -945,41 +893,19 @@ private Mono>> createOrUpdateAtResourceGroupWithRespon @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateAtResourceGroupWithResponse(String resourceGroupName, String deploymentStackName, DeploymentStackInner deploymentStack) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateAtResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, Context.NONE); + return service.createOrUpdateAtResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, contentType, accept, + deploymentStack, Context.NONE); } /** - * Creates or updates a Deployment stack at Resource Group scope. + * Creates or updates a Deployment stack at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -989,41 +915,19 @@ private Response createOrUpdateAtResourceGroupWithResponse(String re @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateAtResourceGroupWithResponse(String resourceGroupName, String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateAtResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, context); + return service.createOrUpdateAtResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, contentType, accept, + deploymentStack, context); } /** - * Creates or updates a Deployment stack at Resource Group scope. + * Creates or updates a Deployment stack at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1039,11 +943,11 @@ private PollerFlux, DeploymentStackInner> begin } /** - * Creates or updates a Deployment stack at Resource Group scope. + * Creates or updates a Deployment stack at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1059,11 +963,11 @@ public SyncPoller, DeploymentStackInner> beginC } /** - * Creates or updates a Deployment stack at Resource Group scope. + * Creates or updates a Deployment stack at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1080,11 +984,11 @@ public SyncPoller, DeploymentStackInner> beginC } /** - * Creates or updates a Deployment stack at Resource Group scope. + * Creates or updates a Deployment stack at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1098,11 +1002,11 @@ private Mono createOrUpdateAtResourceGroupAsync(String res } /** - * Creates or updates a Deployment stack at Resource Group scope. + * Creates or updates a Deployment stack at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1116,11 +1020,11 @@ public DeploymentStackInner createOrUpdateAtResourceGroup(String resourceGroupNa } /** - * Creates or updates a Deployment stack at Resource Group scope. + * Creates or updates a Deployment stack at the specified scope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1135,113 +1039,7 @@ public DeploymentStackInner createOrUpdateAtResourceGroup(String resourceGroupNa } /** - * Gets a Deployment stack with a given name at Resource Group scope. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentStackName Name of the deployment stack. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Resource Group scope along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String deploymentStackName) { - 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 (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentStackName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a Deployment stack with a given name at Resource Group scope. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentStackName Name of the deployment stack. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Resource Group scope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String deploymentStackName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, deploymentStackName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a Deployment stack with a given name at Resource Group scope. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentStackName Name of the deployment stack. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Resource Group scope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String deploymentStackName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentStackName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets a Deployment stack with a given name at Resource Group scope. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentStackName Name of the deployment stack. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Resource Group scope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackInner getByResourceGroup(String resourceGroupName, String deploymentStackName) { - return getByResourceGroupWithResponse(resourceGroupName, deploymentStackName, Context.NONE).getValue(); - } - - /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1249,6 +1047,8 @@ public DeploymentStackInner getByResourceGroup(String resourceGroupName, String * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1258,36 +1058,21 @@ public DeploymentStackInner getByResourceGroup(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, - String deploymentStackName, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - 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 (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - final String accept = "application/json"; + String deploymentStackName, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, - unmanageActionManagementGroups, bypassStackOutOfSyncError, this.client.getApiVersion(), accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1295,6 +1080,8 @@ private Mono>> deleteWithResponseAsync(String resource * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1304,35 +1091,19 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, - bypassStackOutOfSyncError, this.client.getApiVersion(), accept, Context.NONE); + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError, Context.NONE); } /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1340,6 +1111,8 @@ private Response deleteWithResponse(String resourceGroupName, String * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @param context The context to associate with this operation. @@ -1350,36 +1123,19 @@ private Response deleteWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, - bypassStackOutOfSyncError, this.client.getApiVersion(), accept, context); + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError, context); } /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1387,6 +1143,8 @@ private Response deleteWithResponse(String resourceGroupName, String * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1396,18 +1154,20 @@ private Response deleteWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, deploymentStackName, + unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1419,19 +1179,20 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String deploymentStackName) { - final UnmanageActionResourceMode unmanageActionResources = null; - final UnmanageActionResourceGroupMode unmanageActionResourceGroups = null; - final UnmanageActionManagementGroupMode unmanageActionManagementGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; final Boolean bypassStackOutOfSyncError = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, deploymentStackName, + unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1439,6 +1200,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1448,17 +1211,19 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - Response response - = deleteWithResponse(resourceGroupName, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + Response response = deleteWithResponse(resourceGroupName, deploymentStackName, + unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError); return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1470,18 +1235,19 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentStackName) { - final UnmanageActionResourceMode unmanageActionResources = null; - final UnmanageActionResourceGroupMode unmanageActionResourceGroups = null; - final UnmanageActionManagementGroupMode unmanageActionManagementGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; final Boolean bypassStackOutOfSyncError = null; - Response response - = deleteWithResponse(resourceGroupName, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); + Response response = deleteWithResponse(resourceGroupName, deploymentStackName, + unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError); return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1489,6 +1255,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @param context The context to associate with this operation. @@ -1499,18 +1267,19 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context) { - Response response - = deleteWithResponse(resourceGroupName, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError, context); + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + Response response = deleteWithResponse(resourceGroupName, deploymentStackName, + unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, context); return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1518,6 +1287,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1527,16 +1298,18 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { return beginDeleteAsync(resourceGroupName, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError).last() - .flatMap(this.client::getLroFinalResultOrError); + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1548,17 +1321,18 @@ private Mono deleteAsync(String resourceGroupName, String deploymentStackN */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String deploymentStackName) { - final UnmanageActionResourceMode unmanageActionResources = null; - final UnmanageActionResourceGroupMode unmanageActionResourceGroups = null; - final UnmanageActionManagementGroupMode unmanageActionManagementGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; final Boolean bypassStackOutOfSyncError = null; return beginDeleteAsync(resourceGroupName, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError).last() - .flatMap(this.client::getLroFinalResultOrError); + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1569,16 +1343,18 @@ private Mono deleteAsync(String resourceGroupName, String deploymentStackN */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String deploymentStackName) { - final UnmanageActionResourceMode unmanageActionResources = null; - final UnmanageActionResourceGroupMode unmanageActionResourceGroups = null; - final UnmanageActionManagementGroupMode unmanageActionManagementGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; final Boolean bypassStackOutOfSyncError = null; beginDelete(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, - unmanageActionManagementGroups, bypassStackOutOfSyncError).getFinalResult(); + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError) + .getFinalResult(); } /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1586,6 +1362,8 @@ public void delete(String resourceGroupName, String deploymentStackName) { * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @param context The context to associate with this operation. @@ -1595,743 +1373,473 @@ public void delete(String resourceGroupName, String deploymentStackName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context) { + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { beginDelete(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, - unmanageActionManagementGroups, bypassStackOutOfSyncError, context).getFinalResult(); + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, + context).getFinalResult(); } /** - * Creates or updates a Deployment stack at Subscription scope. + * Exports the template used to create the Deployment stack at the specified scope. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object along with {@link Response} on successful completion of {@link Mono}. + * @return export Template specific properties of the Deployment stack along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateAtSubscriptionWithResponseAsync(String deploymentStackName, - DeploymentStackInner deploymentStack) { - 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 (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } + private Mono> + exportTemplateAtResourceGroupWithResponseAsync(String resourceGroupName, String deploymentStackName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdateAtSubscription(this.client.getEndpoint(), - this.client.getSubscriptionId(), deploymentStackName, this.client.getApiVersion(), deploymentStack, - accept, context)) + .withContext( + context -> service.exportTemplateAtResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a Deployment stack at Subscription scope. + * Exports the template used to create the Deployment stack at the specified scope. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object along with {@link Response}. + * @return export Template specific properties of the Deployment stack on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateAtSubscriptionWithResponse(String deploymentStackName, - DeploymentStackInner deploymentStack) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } - final String accept = "application/json"; - return service.createOrUpdateAtSubscriptionSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, Context.NONE); + private Mono exportTemplateAtResourceGroupAsync(String resourceGroupName, + String deploymentStackName) { + return exportTemplateAtResourceGroupWithResponseAsync(resourceGroupName, deploymentStackName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates or updates a Deployment stack at Subscription scope. + * Exports the template used to create the Deployment stack at the specified scope. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object along with {@link Response}. + * @return export Template specific properties of the Deployment stack along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateAtSubscriptionWithResponse(String deploymentStackName, - DeploymentStackInner deploymentStack, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } + public Response exportTemplateAtResourceGroupWithResponse( + String resourceGroupName, String deploymentStackName, Context context) { final String accept = "application/json"; - return service.createOrUpdateAtSubscriptionSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, context); - } - - /** - * Creates or updates a Deployment stack at Subscription scope. - * - * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 deployment stack object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DeploymentStackInner> - beginCreateOrUpdateAtSubscriptionAsync(String deploymentStackName, DeploymentStackInner deploymentStack) { - Mono>> mono - = createOrUpdateAtSubscriptionWithResponseAsync(deploymentStackName, deploymentStack); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DeploymentStackInner.class, DeploymentStackInner.class, this.client.getContext()); + return service.exportTemplateAtResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, accept, context); } /** - * Creates or updates a Deployment stack at Subscription scope. + * Exports the template used to create the Deployment stack at the specified scope. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 deployment stack object. + * @return export Template specific properties of the Deployment stack. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeploymentStackInner> - beginCreateOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack) { - Response response = createOrUpdateAtSubscriptionWithResponse(deploymentStackName, deploymentStack); - return this.client.getLroResult(response, - DeploymentStackInner.class, DeploymentStackInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStackTemplateDefinitionInner exportTemplateAtResourceGroup(String resourceGroupName, + String deploymentStackName) { + return exportTemplateAtResourceGroupWithResponse(resourceGroupName, deploymentStackName, Context.NONE) + .getValue(); } /** - * Creates or updates a Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 deployment stack object. + * @return the Deployment stack with the given name along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtSubscription( - String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { - Response response - = createOrUpdateAtSubscriptionWithResponse(deploymentStackName, deploymentStack, context); - return this.client.getLroResult(response, - DeploymentStackInner.class, DeploymentStackInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAtSubscriptionWithResponseAsync(String deploymentStackName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getAtSubscription(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStackName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object on successful completion of {@link Mono}. + * @return the Deployment stack with the given name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAtSubscriptionAsync(String deploymentStackName, - DeploymentStackInner deploymentStack) { - return beginCreateOrUpdateAtSubscriptionAsync(deploymentStackName, deploymentStack).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono getAtSubscriptionAsync(String deploymentStackName) { + return getAtSubscriptionWithResponseAsync(deploymentStackName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates or updates a Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object. + * @return the Deployment stack with the given name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackInner createOrUpdateAtSubscription(String deploymentStackName, - DeploymentStackInner deploymentStack) { - return beginCreateOrUpdateAtSubscription(deploymentStackName, deploymentStack).getFinalResult(); + public Response getAtSubscriptionWithResponse(String deploymentStackName, Context context) { + final String accept = "application/json"; + return service.getAtSubscriptionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStackName, accept, context); } /** - * Creates or updates a Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object. + * @return the Deployment stack with the given name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackInner createOrUpdateAtSubscription(String deploymentStackName, - DeploymentStackInner deploymentStack, Context context) { - return beginCreateOrUpdateAtSubscription(deploymentStackName, deploymentStack, context).getFinalResult(); + public DeploymentStackInner getAtSubscription(String deploymentStackName) { + return getAtSubscriptionWithResponse(deploymentStackName, Context.NONE).getValue(); } /** - * Gets a Deployment stack with a given name at Subscription scope. + * Lists Deployment stacks at the specified scope. * - * @param deploymentStackName Name of the deployment stack. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Subscription scope along with {@link Response} on successful + * @return the response of a DeploymentStack list operation along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAtSubscriptionWithResponseAsync(String deploymentStackName) { - 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 (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } + private Mono> listSinglePageAsync() { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getAtSubscription(this.client.getEndpoint(), - this.client.getSubscriptionId(), deploymentStackName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); } /** - * Gets a Deployment stack with a given name at Subscription scope. + * Lists Deployment stacks at the specified scope. * - * @param deploymentStackName Name of the deployment stack. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Subscription scope on successful completion of {@link Mono}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAtSubscriptionAsync(String deploymentStackName) { - return getAtSubscriptionWithResponseAsync(deploymentStackName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listAtSubscriptionNextSinglePageAsync(nextLink)); } /** - * Gets a Deployment stack with a given name at Subscription scope. + * Lists Deployment stacks at the specified scope. * - * @param deploymentStackName Name of the deployment stack. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Subscription scope along with {@link Response}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAtSubscriptionWithResponse(String deploymentStackName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } + private PagedResponse listSinglePage() { final String accept = "application/json"; - return service.getAtSubscriptionSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - deploymentStackName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets a Deployment stack with a given name at Subscription scope. - * - * @param deploymentStackName Name of the deployment stack. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Subscription scope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackInner getAtSubscription(String deploymentStackName) { - return getAtSubscriptionWithResponse(deploymentStackName, Context.NONE).getValue(); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Lists Deployment stacks at the specified scope. * - * @param deploymentStackName Name of the deployment stack. - * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. - * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. - * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. - * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not - * correctly synchronized. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteAtSubscriptionWithResponseAsync(String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - 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 (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } + private PagedResponse listSinglePage(Context context) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.deleteAtSubscription(this.client.getEndpoint(), - this.client.getSubscriptionId(), deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, - unmanageActionManagementGroups, bypassStackOutOfSyncError, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Lists Deployment stacks at the specified scope. * - * @param deploymentStackName Name of the deployment stack. - * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. - * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. - * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. - * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not - * correctly synchronized. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteAtSubscriptionWithResponse(String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteAtSubscriptionSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, - bypassStackOutOfSyncError, this.client.getApiVersion(), accept, Context.NONE); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listAtSubscriptionNextSinglePage(nextLink)); } /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Lists Deployment stacks at the specified scope. * - * @param deploymentStackName Name of the deployment stack. - * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. - * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. - * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. - * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not - * correctly synchronized. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteAtSubscriptionWithResponse(String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteAtSubscriptionSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, - bypassStackOutOfSyncError, this.client.getApiVersion(), accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listAtSubscriptionNextSinglePage(nextLink, context)); } /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param deploymentStackName Name of the deployment stack. - * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. - * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. - * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. - * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not - * correctly synchronized. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAtSubscriptionAsync(String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - Mono>> mono - = deleteAtSubscriptionWithResponseAsync(deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateStackAtSubscriptionWithResponseAsync(String deploymentStackName, + DeploymentStackInner deploymentStack) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.validateStackAtSubscription(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), deploymentStackName, contentType, accept, + deploymentStack, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAtSubscriptionAsync(String deploymentStackName) { - final UnmanageActionResourceMode unmanageActionResources = null; - final UnmanageActionResourceGroupMode unmanageActionResourceGroups = null; - final UnmanageActionManagementGroupMode unmanageActionManagementGroups = null; - final Boolean bypassStackOutOfSyncError = null; - Mono>> mono - = deleteAtSubscriptionWithResponseAsync(deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateStackAtSubscriptionWithResponse(String deploymentStackName, + DeploymentStackInner deploymentStack) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateStackAtSubscriptionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStackName, contentType, accept, deploymentStack, Context.NONE); } /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param deploymentStackName Name of the deployment stack. - * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. - * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. - * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. - * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not - * correctly synchronized. + * @param deploymentStack The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteAtSubscription(String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - Response response = deleteAtSubscriptionWithResponse(deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateStackAtSubscriptionWithResponse(String deploymentStackName, + DeploymentStackInner deploymentStack, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateStackAtSubscriptionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStackName, contentType, accept, deploymentStack, context); } /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteAtSubscription(String deploymentStackName) { - final UnmanageActionResourceMode unmanageActionResources = null; - final UnmanageActionResourceGroupMode unmanageActionResourceGroups = null; - final UnmanageActionManagementGroupMode unmanageActionManagementGroups = null; - final Boolean bypassStackOutOfSyncError = null; - Response response = deleteAtSubscriptionWithResponse(deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + private PollerFlux, DeploymentStackValidateResultInner> + beginValidateStackAtSubscriptionAsync(String deploymentStackName, DeploymentStackInner deploymentStack) { + Mono>> mono + = validateStackAtSubscriptionWithResponseAsync(deploymentStackName, deploymentStack); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DeploymentStackValidateResultInner.class, + DeploymentStackValidateResultInner.class, this.client.getContext()); } /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param deploymentStackName Name of the deployment stack. - * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. - * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. - * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. - * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not - * correctly synchronized. - * @param context The context to associate with this operation. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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> beginDeleteAtSubscription(String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context) { - Response response = deleteAtSubscriptionWithResponse(deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, DeploymentStackValidateResultInner> + beginValidateStackAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack) { + Response response = validateStackAtSubscriptionWithResponse(deploymentStackName, deploymentStack); + return this.client.getLroResult( + response, DeploymentStackValidateResultInner.class, DeploymentStackValidateResultInner.class, Context.NONE); } /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param deploymentStackName Name of the deployment stack. - * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. - * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. - * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. - * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not - * correctly synchronized. + * @param deploymentStack The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAtSubscriptionAsync(String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - return beginDeleteAtSubscriptionAsync(deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DeploymentStackValidateResultInner> + beginValidateStackAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack, + Context context) { + Response response + = validateStackAtSubscriptionWithResponse(deploymentStackName, deploymentStack, context); + return this.client.getLroResult( + response, DeploymentStackValidateResultInner.class, DeploymentStackValidateResultInner.class, context); } /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAtSubscriptionAsync(String deploymentStackName) { - final UnmanageActionResourceMode unmanageActionResources = null; - final UnmanageActionResourceGroupMode unmanageActionResourceGroups = null; - final UnmanageActionManagementGroupMode unmanageActionManagementGroups = null; - final Boolean bypassStackOutOfSyncError = null; - return beginDeleteAtSubscriptionAsync(deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono validateStackAtSubscriptionAsync(String deploymentStackName, + DeploymentStackInner deploymentStack) { + return beginValidateStackAtSubscriptionAsync(deploymentStackName, deploymentStack).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteAtSubscription(String deploymentStackName) { - final UnmanageActionResourceMode unmanageActionResources = null; - final UnmanageActionResourceGroupMode unmanageActionResourceGroups = null; - final UnmanageActionManagementGroupMode unmanageActionManagementGroups = null; - final Boolean bypassStackOutOfSyncError = null; - beginDeleteAtSubscription(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, - unmanageActionManagementGroups, bypassStackOutOfSyncError).getFinalResult(); + public DeploymentStackValidateResultInner validateStackAtSubscription(String deploymentStackName, + DeploymentStackInner deploymentStack) { + return beginValidateStackAtSubscription(deploymentStackName, deploymentStack).getFinalResult(); } /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param deploymentStackName Name of the deployment stack. - * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. - * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. - * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. - * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not - * correctly synchronized. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteAtSubscription(String deploymentStackName, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context) { - beginDeleteAtSubscription(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, - unmanageActionManagementGroups, bypassStackOutOfSyncError, context).getFinalResult(); + public DeploymentStackValidateResultInner validateStackAtSubscription(String deploymentStackName, + DeploymentStackInner deploymentStack, Context context) { + return beginValidateStackAtSubscription(deploymentStackName, deploymentStack, context).getFinalResult(); } /** - * Creates or updates a Deployment stack at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return deployment stack object along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateAtManagementGroupWithResponseAsync(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - return Mono - .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - if (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } + private Mono>> createOrUpdateAtSubscriptionWithResponseAsync(String deploymentStackName, + DeploymentStackInner deploymentStack) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdateAtManagementGroup(this.client.getEndpoint(), - managementGroupId, deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, context)) + .withContext(context -> service.createOrUpdateAtSubscription(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), deploymentStackName, contentType, accept, + deploymentStack, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a Deployment stack at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return deployment stack object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateAtManagementGroupWithResponse(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } + private Response createOrUpdateAtSubscriptionWithResponse(String deploymentStackName, + DeploymentStackInner deploymentStack) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateAtManagementGroupSync(this.client.getEndpoint(), managementGroupId, - deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, Context.NONE); + return service.createOrUpdateAtSubscriptionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStackName, contentType, accept, deploymentStack, Context.NONE); } /** - * Creates or updates a Deployment stack at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2339,38 +1847,19 @@ private Response createOrUpdateAtManagementGroupWithResponse(String * @return deployment stack object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateAtManagementGroupWithResponse(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } + private Response createOrUpdateAtSubscriptionWithResponse(String deploymentStackName, + DeploymentStackInner deploymentStack, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateAtManagementGroupSync(this.client.getEndpoint(), managementGroupId, - deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, context); + return service.createOrUpdateAtSubscriptionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStackName, contentType, accept, deploymentStack, context); } /** - * Creates or updates a Deployment stack at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2378,40 +1867,36 @@ private Response createOrUpdateAtManagementGroupWithResponse(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DeploymentStackInner> - beginCreateOrUpdateAtManagementGroupAsync(String managementGroupId, String deploymentStackName, - DeploymentStackInner deploymentStack) { + beginCreateOrUpdateAtSubscriptionAsync(String deploymentStackName, DeploymentStackInner deploymentStack) { Mono>> mono - = createOrUpdateAtManagementGroupWithResponseAsync(managementGroupId, deploymentStackName, deploymentStack); + = createOrUpdateAtSubscriptionWithResponseAsync(deploymentStackName, deploymentStack); return this.client.getLroResult(mono, this.client.getHttpPipeline(), DeploymentStackInner.class, DeploymentStackInner.class, this.client.getContext()); } /** - * Creates or updates a Deployment stack at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 deployment stack object. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtManagementGroup( - String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack) { - Response response - = createOrUpdateAtManagementGroupWithResponse(managementGroupId, deploymentStackName, deploymentStack); + public SyncPoller, DeploymentStackInner> + beginCreateOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack) { + Response response = createOrUpdateAtSubscriptionWithResponse(deploymentStackName, deploymentStack); return this.client.getLroResult(response, DeploymentStackInner.class, DeploymentStackInner.class, Context.NONE); } /** - * Creates or updates a Deployment stack at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2419,56 +1904,52 @@ public SyncPoller, DeploymentStackInner> beginC * @return the {@link SyncPoller} for polling of deployment stack object. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtManagementGroup( - String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { - Response response = createOrUpdateAtManagementGroupWithResponse(managementGroupId, - deploymentStackName, deploymentStack, context); + public SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtSubscription( + String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { + Response response + = createOrUpdateAtSubscriptionWithResponse(deploymentStackName, deploymentStack, context); return this.client.getLroResult(response, DeploymentStackInner.class, DeploymentStackInner.class, context); } /** - * Creates or updates a Deployment stack at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return deployment stack object on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAtManagementGroupAsync(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack) { - return beginCreateOrUpdateAtManagementGroupAsync(managementGroupId, deploymentStackName, deploymentStack).last() + private Mono createOrUpdateAtSubscriptionAsync(String deploymentStackName, + DeploymentStackInner deploymentStack) { + return beginCreateOrUpdateAtSubscriptionAsync(deploymentStackName, deploymentStack).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates or updates a Deployment stack at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return deployment stack object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackInner createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, + public DeploymentStackInner createOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack) { - return beginCreateOrUpdateAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack) - .getFinalResult(); + return beginCreateOrUpdateAtSubscription(deploymentStackName, deploymentStack).getFinalResult(); } /** - * Creates or updates a Deployment stack at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2476,117 +1957,21 @@ public DeploymentStackInner createOrUpdateAtManagementGroup(String managementGro * @return deployment stack object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackInner createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, + public DeploymentStackInner createOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { - return beginCreateOrUpdateAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack, context) - .getFinalResult(); - } - - /** - * Gets a Deployment stack with a given name at Management Group scope. - * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Management Group scope along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAtManagementGroupWithResponseAsync(String managementGroupId, - String deploymentStackName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - return Mono - .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - if (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getAtManagementGroup(this.client.getEndpoint(), managementGroupId, - deploymentStackName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a Deployment stack with a given name at Management Group scope. - * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Management Group scope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAtManagementGroupAsync(String managementGroupId, String deploymentStackName) { - return getAtManagementGroupWithResponseAsync(managementGroupId, deploymentStackName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a Deployment stack with a given name at Management Group scope. - * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Management Group scope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAtManagementGroupWithResponse(String managementGroupId, - String deploymentStackName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getAtManagementGroupSync(this.client.getEndpoint(), managementGroupId, deploymentStackName, - this.client.getApiVersion(), accept, context); - } - - /** - * Gets a Deployment stack with a given name at Management Group scope. - * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Management Group scope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackInner getAtManagementGroup(String managementGroupId, String deploymentStackName) { - return getAtManagementGroupWithResponse(managementGroupId, deploymentStackName, Context.NONE).getValue(); + return beginCreateOrUpdateAtSubscription(deploymentStackName, deploymentStack, context).getFinalResult(); } /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2595,38 +1980,30 @@ public DeploymentStackInner getAtManagementGroup(String managementGroupId, Strin * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteAtManagementGroupWithResponseAsync(String managementGroupId, - String deploymentStackName, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - return Mono - .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - if (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.deleteAtManagementGroup(this.client.getEndpoint(), - managementGroupId, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, - unmanageActionManagementGroups, bypassStackOutOfSyncError, this.client.getApiVersion(), accept, context)) + private Mono>> deleteAtSubscriptionWithResponseAsync(String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + return FluxUtil + .withContext(context -> service.deleteAtSubscription(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2635,38 +2012,28 @@ private Mono>> deleteAtManagementGroupWithResponseAsyn * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteAtManagementGroupWithResponse(String managementGroupId, - String deploymentStackName, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteAtManagementGroupSync(this.client.getEndpoint(), managementGroupId, deploymentStackName, - unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, - bypassStackOutOfSyncError, this.client.getApiVersion(), accept, Context.NONE); + private Response deleteAtSubscriptionWithResponse(String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + return service.deleteAtSubscriptionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, + Context.NONE); } /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @param context The context to associate with this operation. @@ -2676,39 +2043,28 @@ private Response deleteAtManagementGroupWithResponse(String manageme * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteAtManagementGroupWithResponse(String managementGroupId, - String deploymentStackName, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteAtManagementGroupSync(this.client.getEndpoint(), managementGroupId, deploymentStackName, - unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, - bypassStackOutOfSyncError, this.client.getApiVersion(), accept, context); + private Response deleteAtSubscriptionWithResponse(String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + return service.deleteAtSubscriptionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, + context); } /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2717,22 +2073,23 @@ private Response deleteAtManagementGroupWithResponse(String manageme * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAtManagementGroupAsync(String managementGroupId, - String deploymentStackName, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - Mono>> mono - = deleteAtManagementGroupWithResponseAsync(managementGroupId, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); + private PollerFlux, Void> beginDeleteAtSubscriptionAsync(String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + Mono>> mono = deleteAtSubscriptionWithResponseAsync(deploymentStackName, + unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2740,28 +2097,29 @@ private PollerFlux, Void> beginDeleteAtManagementGroupAsync(Str * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAtManagementGroupAsync(String managementGroupId, - String deploymentStackName) { - final UnmanageActionResourceMode unmanageActionResources = null; - final UnmanageActionResourceGroupMode unmanageActionResourceGroups = null; - final UnmanageActionManagementGroupMode unmanageActionManagementGroups = null; + private PollerFlux, Void> beginDeleteAtSubscriptionAsync(String deploymentStackName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; final Boolean bypassStackOutOfSyncError = null; - Mono>> mono - = deleteAtManagementGroupWithResponseAsync(managementGroupId, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); + Mono>> mono = deleteAtSubscriptionWithResponseAsync(deploymentStackName, + unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2770,21 +2128,22 @@ private PollerFlux, Void> beginDeleteAtManagementGroupAsync(Str * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteAtManagementGroup(String managementGroupId, - String deploymentStackName, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - Response response - = deleteAtManagementGroupWithResponse(managementGroupId, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); + public SyncPoller, Void> beginDeleteAtSubscription(String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + Response response = deleteAtSubscriptionWithResponse(deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError); return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2792,27 +2151,28 @@ public SyncPoller, Void> beginDeleteAtManagementGroup(String ma * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteAtManagementGroup(String managementGroupId, - String deploymentStackName) { - final UnmanageActionResourceMode unmanageActionResources = null; - final UnmanageActionResourceGroupMode unmanageActionResourceGroups = null; - final UnmanageActionManagementGroupMode unmanageActionManagementGroups = null; + public SyncPoller, Void> beginDeleteAtSubscription(String deploymentStackName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; final Boolean bypassStackOutOfSyncError = null; - Response response - = deleteAtManagementGroupWithResponse(managementGroupId, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); + Response response = deleteAtSubscriptionWithResponse(deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError); return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @param context The context to associate with this operation. @@ -2822,26 +2182,28 @@ public SyncPoller, Void> beginDeleteAtManagementGroup(String ma * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteAtManagementGroup(String managementGroupId, - String deploymentStackName, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context) { - Response response - = deleteAtManagementGroupWithResponse(managementGroupId, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError, context); + public SyncPoller, Void> beginDeleteAtSubscription(String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + Response response = deleteAtSubscriptionWithResponse(deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError, context); return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2850,20 +2212,21 @@ public SyncPoller, Void> beginDeleteAtManagementGroup(String ma * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAtManagementGroupAsync(String managementGroupId, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError) { - return beginDeleteAtManagementGroupAsync(managementGroupId, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAtSubscriptionAsync(String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + return beginDeleteAtSubscriptionAsync(deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2871,45 +2234,48 @@ private Mono deleteAtManagementGroupAsync(String managementGroupId, String * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAtManagementGroupAsync(String managementGroupId, String deploymentStackName) { - final UnmanageActionResourceMode unmanageActionResources = null; - final UnmanageActionResourceGroupMode unmanageActionResourceGroups = null; - final UnmanageActionManagementGroupMode unmanageActionManagementGroups = null; + private Mono deleteAtSubscriptionAsync(String deploymentStackName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; final Boolean bypassStackOutOfSyncError = null; - return beginDeleteAtManagementGroupAsync(managementGroupId, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError).last() - .flatMap(this.client::getLroFinalResultOrError); + return beginDeleteAtSubscriptionAsync(deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 deleteAtManagementGroup(String managementGroupId, String deploymentStackName) { - final UnmanageActionResourceMode unmanageActionResources = null; - final UnmanageActionResourceGroupMode unmanageActionResourceGroups = null; - final UnmanageActionManagementGroupMode unmanageActionManagementGroups = null; + public void deleteAtSubscription(String deploymentStackName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; final Boolean bypassStackOutOfSyncError = null; - beginDeleteAtManagementGroup(managementGroupId, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError).getFinalResult(); + beginDeleteAtSubscription(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError) + .getFinalResult(); } /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @param context The context to associate with this operation. @@ -2918,20 +2284,20 @@ public void deleteAtManagementGroup(String managementGroupId, String deploymentS * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteAtManagementGroup(String managementGroupId, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context) { - beginDeleteAtManagementGroup(managementGroupId, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError, context) - .getFinalResult(); + public void deleteAtSubscription(String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + beginDeleteAtSubscription(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, + context).getFinalResult(); } /** - * Exports the template used to create the Deployment stack at Resource Group scope. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2941,35 +2307,17 @@ public void deleteAtManagementGroup(String managementGroupId, String deploymentS */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - exportTemplateAtResourceGroupWithResponseAsync(String resourceGroupName, String deploymentStackName) { - 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 (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } + exportTemplateAtSubscriptionWithResponseAsync(String deploymentStackName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.exportTemplateAtResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, this.client.getApiVersion(), - accept, context)) + .withContext(context -> service.exportTemplateAtSubscription(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), deploymentStackName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Exports the template used to create the Deployment stack at Resource Group scope. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2977,16 +2325,14 @@ public void deleteAtManagementGroup(String managementGroupId, String deploymentS * @return export Template specific properties of the Deployment stack on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono exportTemplateAtResourceGroupAsync(String resourceGroupName, - String deploymentStackName) { - return exportTemplateAtResourceGroupWithResponseAsync(resourceGroupName, deploymentStackName) + private Mono exportTemplateAtSubscriptionAsync(String deploymentStackName) { + return exportTemplateAtSubscriptionWithResponseAsync(deploymentStackName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Exports the template used to create the Deployment stack at Resource Group scope. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2995,980 +2341,996 @@ private Mono exportTemplateAtResourceGro * @return export Template specific properties of the Deployment stack along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response exportTemplateAtResourceGroupWithResponse( - String resourceGroupName, String deploymentStackName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } + public Response + exportTemplateAtSubscriptionWithResponse(String deploymentStackName, Context context) { final String accept = "application/json"; - return service.exportTemplateAtResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentStackName, this.client.getApiVersion(), accept, context); + return service.exportTemplateAtSubscriptionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStackName, accept, context); } /** - * Exports the template used to create the Deployment stack at Resource Group scope. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return export Template specific properties of the Deployment stack. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackTemplateDefinitionInner exportTemplateAtResourceGroup(String resourceGroupName, - String deploymentStackName) { - return exportTemplateAtResourceGroupWithResponse(resourceGroupName, deploymentStackName, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStackTemplateDefinitionInner exportTemplateAtSubscription(String deploymentStackName) { + return exportTemplateAtSubscriptionWithResponse(deploymentStackName, Context.NONE).getValue(); } /** - * Exports the template used to create the Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack along with {@link Response} on successful - * completion of {@link Mono}. + * @return the Deployment stack with the given name along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - exportTemplateAtSubscriptionWithResponseAsync(String deploymentStackName) { - 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 (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } + private Mono> getAtManagementGroupWithResponseAsync(String managementGroupId, + String deploymentStackName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.exportTemplateAtSubscription(this.client.getEndpoint(), - this.client.getSubscriptionId(), deploymentStackName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getAtManagementGroup(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, deploymentStackName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Exports the template used to create the Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack on successful completion of {@link Mono}. + * @return the Deployment stack with the given name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono exportTemplateAtSubscriptionAsync(String deploymentStackName) { - return exportTemplateAtSubscriptionWithResponseAsync(deploymentStackName) + private Mono getAtManagementGroupAsync(String managementGroupId, String deploymentStackName) { + return getAtManagementGroupWithResponseAsync(managementGroupId, deploymentStackName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Exports the template used to create the Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack along with {@link Response}. + * @return the Deployment stack with the given name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response - exportTemplateAtSubscriptionWithResponse(String deploymentStackName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } + public Response getAtManagementGroupWithResponse(String managementGroupId, + String deploymentStackName, Context context) { final String accept = "application/json"; - return service.exportTemplateAtSubscriptionSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - deploymentStackName, this.client.getApiVersion(), accept, context); + return service.getAtManagementGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, deploymentStackName, accept, context); } /** - * Exports the template used to create the Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack. + * @return the Deployment stack with the given name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackTemplateDefinitionInner exportTemplateAtSubscription(String deploymentStackName) { - return exportTemplateAtSubscriptionWithResponse(deploymentStackName, Context.NONE).getValue(); + public DeploymentStackInner getAtManagementGroup(String managementGroupId, String deploymentStackName) { + return getAtManagementGroupWithResponse(managementGroupId, deploymentStackName, Context.NONE).getValue(); } /** - * Exports the template used to create the Deployment stack at Management Group scope. + * Lists Deployment stacks at the specified scope. * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. + * @param managementGroupId The name of the management group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack along with {@link Response} on successful + * @return the response of a DeploymentStack list operation along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - exportTemplateAtManagementGroupWithResponseAsync(String managementGroupId, String deploymentStackName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - return Mono - .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - if (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } + private Mono> listAtManagementGroupSinglePageAsync(String managementGroupId) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.exportTemplateAtManagementGroup(this.client.getEndpoint(), - managementGroupId, deploymentStackName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listAtManagementGroup(this.client.getEndpoint(), + this.client.getApiVersion(), managementGroupId, 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())); } /** - * Exports the template used to create the Deployment stack at Management Group scope. + * Lists Deployment stacks at the specified scope. * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. + * @param managementGroupId The name of the management group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack on successful completion of {@link Mono}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAtManagementGroupAsync(String managementGroupId) { + return new PagedFlux<>(() -> listAtManagementGroupSinglePageAsync(managementGroupId), + nextLink -> listAtManagementGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono exportTemplateAtManagementGroupAsync(String managementGroupId, - String deploymentStackName) { - return exportTemplateAtManagementGroupWithResponseAsync(managementGroupId, deploymentStackName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listAtManagementGroupSinglePage(String managementGroupId) { + final String accept = "application/json"; + Response res = service.listAtManagementGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), managementGroupId, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Exports the template used to create the Deployment stack at Management Group scope. + * Lists Deployment stacks at the specified scope. * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack along with {@link Response}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response exportTemplateAtManagementGroupWithResponse( - String managementGroupId, String deploymentStackName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } + private PagedResponse listAtManagementGroupSinglePage(String managementGroupId, + Context context) { final String accept = "application/json"; - return service.exportTemplateAtManagementGroupSync(this.client.getEndpoint(), managementGroupId, - deploymentStackName, this.client.getApiVersion(), accept, context); + Response res = service.listAtManagementGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), managementGroupId, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Exports the template used to create the Deployment stack at Management Group scope. + * Lists Deployment stacks at the specified scope. * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. + * @param managementGroupId The name of the management group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackTemplateDefinitionInner exportTemplateAtManagementGroup(String managementGroupId, - String deploymentStackName) { - return exportTemplateAtManagementGroupWithResponse(managementGroupId, deploymentStackName, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAtManagementGroup(String managementGroupId) { + return new PagedIterable<>(() -> listAtManagementGroupSinglePage(managementGroupId), + nextLink -> listAtManagementGroupNextSinglePage(nextLink)); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAtManagementGroup(String managementGroupId, Context context) { + return new PagedIterable<>(() -> listAtManagementGroupSinglePage(managementGroupId, context), + nextLink -> listAtManagementGroupNextSinglePage(nextLink, context)); } /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateStackAtResourceGroupWithResponseAsync(String resourceGroupName, + private Mono>> validateStackAtManagementGroupWithResponseAsync(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack) { - 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 (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.validateStackAtResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, deploymentStackName, this.client.getApiVersion(), - deploymentStack, accept, context)) + .withContext(context -> service.validateStackAtManagementGroup(this.client.getEndpoint(), + this.client.getApiVersion(), managementGroupId, deploymentStackName, contentType, accept, + deploymentStack, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response validateStackAtResourceGroupWithResponse(String resourceGroupName, + private Response validateStackAtManagementGroupWithResponse(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.validateStackAtResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, Context.NONE); + return service.validateStackAtManagementGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, deploymentStackName, contentType, accept, deploymentStack, Context.NONE); } /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response validateStackAtResourceGroupWithResponse(String resourceGroupName, + private Response validateStackAtManagementGroupWithResponse(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.validateStackAtResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, context); + return service.validateStackAtManagementGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, deploymentStackName, contentType, accept, deploymentStack, context); } /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the Deployment stack validation result. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DeploymentStackValidateResultInner> - beginValidateStackAtResourceGroupAsync(String resourceGroupName, String deploymentStackName, + beginValidateStackAtManagementGroupAsync(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack) { Mono>> mono - = validateStackAtResourceGroupWithResponseAsync(resourceGroupName, deploymentStackName, deploymentStack); + = validateStackAtManagementGroupWithResponseAsync(managementGroupId, deploymentStackName, deploymentStack); return this.client.getLroResult(mono, this.client.getHttpPipeline(), DeploymentStackValidateResultInner.class, DeploymentStackValidateResultInner.class, this.client.getContext()); } /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the Deployment stack validation result. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DeploymentStackValidateResultInner> - beginValidateStackAtResourceGroup(String resourceGroupName, String deploymentStackName, + beginValidateStackAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack) { Response response - = validateStackAtResourceGroupWithResponse(resourceGroupName, deploymentStackName, deploymentStack); + = validateStackAtManagementGroupWithResponse(managementGroupId, deploymentStackName, deploymentStack); return this.client.getLroResult( response, DeploymentStackValidateResultInner.class, DeploymentStackValidateResultInner.class, Context.NONE); } /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the Deployment stack validation result. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DeploymentStackValidateResultInner> - beginValidateStackAtResourceGroup(String resourceGroupName, String deploymentStackName, + beginValidateStackAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { - Response response = validateStackAtResourceGroupWithResponse(resourceGroupName, deploymentStackName, - deploymentStack, context); + Response response = validateStackAtManagementGroupWithResponse(managementGroupId, + deploymentStackName, deploymentStack, context); return this.client.getLroResult( response, DeploymentStackValidateResultInner.class, DeploymentStackValidateResultInner.class, context); } /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateStackAtResourceGroupAsync(String resourceGroupName, + private Mono validateStackAtManagementGroupAsync(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack) { - return beginValidateStackAtResourceGroupAsync(resourceGroupName, deploymentStackName, deploymentStack).last() + return beginValidateStackAtManagementGroupAsync(managementGroupId, deploymentStackName, deploymentStack).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackValidateResultInner validateStackAtResourceGroup(String resourceGroupName, + public DeploymentStackValidateResultInner validateStackAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack) { - return beginValidateStackAtResourceGroup(resourceGroupName, deploymentStackName, deploymentStack) + return beginValidateStackAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack) .getFinalResult(); } /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackValidateResultInner validateStackAtResourceGroup(String resourceGroupName, + public DeploymentStackValidateResultInner validateStackAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { - return beginValidateStackAtResourceGroup(resourceGroupName, deploymentStackName, deploymentStack, context) + return beginValidateStackAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack, context) .getFinalResult(); } /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Creates or updates a Deployment stack at the specified scope. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result along with {@link Response} on successful completion of - * {@link Mono}. + * @return deployment stack object along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateStackAtSubscriptionWithResponseAsync(String deploymentStackName, + private Mono>> createOrUpdateAtManagementGroupWithResponseAsync(String managementGroupId, + String deploymentStackName, DeploymentStackInner deploymentStack) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdateAtManagementGroup(this.client.getEndpoint(), + this.client.getApiVersion(), managementGroupId, deploymentStackName, contentType, accept, + deploymentStack, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateAtManagementGroupWithResponse(String managementGroupId, + String deploymentStackName, DeploymentStackInner deploymentStack) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateAtManagementGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, deploymentStackName, contentType, accept, deploymentStack, Context.NONE); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateAtManagementGroupWithResponse(String managementGroupId, + String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateAtManagementGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, deploymentStackName, contentType, accept, deploymentStack, context); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DeploymentStackInner> + beginCreateOrUpdateAtManagementGroupAsync(String managementGroupId, String deploymentStackName, + DeploymentStackInner deploymentStack) { + Mono>> mono + = createOrUpdateAtManagementGroupWithResponseAsync(managementGroupId, deploymentStackName, deploymentStack); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DeploymentStackInner.class, DeploymentStackInner.class, this.client.getContext()); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtManagementGroup( + String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack) { + Response response + = createOrUpdateAtManagementGroupWithResponse(managementGroupId, deploymentStackName, deploymentStack); + return this.client.getLroResult(response, + DeploymentStackInner.class, DeploymentStackInner.class, Context.NONE); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DeploymentStackInner> beginCreateOrUpdateAtManagementGroup( + String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { + Response response = createOrUpdateAtManagementGroupWithResponse(managementGroupId, + deploymentStackName, deploymentStack, context); + return this.client.getLroResult(response, + DeploymentStackInner.class, DeploymentStackInner.class, context); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAtManagementGroupAsync(String managementGroupId, + String deploymentStackName, DeploymentStackInner deploymentStack) { + return beginCreateOrUpdateAtManagementGroupAsync(managementGroupId, deploymentStackName, deploymentStack).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStackInner createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack) { - 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 (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.validateStackAtSubscription(this.client.getEndpoint(), - this.client.getSubscriptionId(), deploymentStackName, this.client.getApiVersion(), deploymentStack, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return beginCreateOrUpdateAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack) + .getFinalResult(); } /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Creates or updates a Deployment stack at the specified scope. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result along with {@link Response}. + * @return deployment stack object. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response validateStackAtSubscriptionWithResponse(String deploymentStackName, - DeploymentStackInner deploymentStack) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } - final String accept = "application/json"; - return service.validateStackAtSubscriptionSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, Context.NONE); + public DeploymentStackInner createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, + DeploymentStackInner deploymentStack, Context context) { + return beginCreateOrUpdateAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack, context) + .getFinalResult(); } /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. - * @param context The context to associate with this operation. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result along with {@link Response}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response validateStackAtSubscriptionWithResponse(String deploymentStackName, - DeploymentStackInner deploymentStack, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } - final String accept = "application/json"; - return service.validateStackAtSubscriptionSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, context); + private Mono>> deleteAtManagementGroupWithResponseAsync(String managementGroupId, + String deploymentStackName, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + return FluxUtil + .withContext(context -> service.deleteAtManagementGroup(this.client.getEndpoint(), + this.client.getApiVersion(), managementGroupId, deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the Deployment stack validation result. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DeploymentStackValidateResultInner> - beginValidateStackAtSubscriptionAsync(String deploymentStackName, DeploymentStackInner deploymentStack) { - Mono>> mono - = validateStackAtSubscriptionWithResponseAsync(deploymentStackName, deploymentStack); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DeploymentStackValidateResultInner.class, - DeploymentStackValidateResultInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteAtManagementGroupWithResponse(String managementGroupId, + String deploymentStackName, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + return service.deleteAtManagementGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, + Context.NONE); } /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the Deployment stack validation result. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeploymentStackValidateResultInner> - beginValidateStackAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack) { - Response response = validateStackAtSubscriptionWithResponse(deploymentStackName, deploymentStack); - return this.client.getLroResult( - response, DeploymentStackValidateResultInner.class, DeploymentStackValidateResultInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteAtManagementGroupWithResponse(String managementGroupId, + String deploymentStackName, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + return service.deleteAtManagementGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, + context); } /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. - * @param context The context to associate with this operation. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the Deployment stack validation result. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeploymentStackValidateResultInner> - beginValidateStackAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack, - Context context) { - Response response - = validateStackAtSubscriptionWithResponse(deploymentStackName, deploymentStack, context); - return this.client.getLroResult( - response, DeploymentStackValidateResultInner.class, DeploymentStackValidateResultInner.class, context); + private PollerFlux, Void> beginDeleteAtManagementGroupAsync(String managementGroupId, + String deploymentStackName, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + Mono>> mono = deleteAtManagementGroupWithResponseAsync(managementGroupId, + deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateStackAtSubscriptionAsync(String deploymentStackName, - DeploymentStackInner deploymentStack) { - return beginValidateStackAtSubscriptionAsync(deploymentStackName, deploymentStack).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAtManagementGroupAsync(String managementGroupId, + String deploymentStackName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; + final Boolean bypassStackOutOfSyncError = null; + Mono>> mono = deleteAtManagementGroupWithResponseAsync(managementGroupId, + deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackValidateResultInner validateStackAtSubscription(String deploymentStackName, - DeploymentStackInner deploymentStack) { - return beginValidateStackAtSubscription(deploymentStackName, deploymentStack).getFinalResult(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteAtManagementGroup(String managementGroupId, + String deploymentStackName, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + Response response = deleteAtManagementGroupWithResponse(managementGroupId, deploymentStackName, + unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackValidateResultInner validateStackAtSubscription(String deploymentStackName, - DeploymentStackInner deploymentStack, Context context) { - return beginValidateStackAtSubscription(deploymentStackName, deploymentStack, context).getFinalResult(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteAtManagementGroup(String managementGroupId, + String deploymentStackName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; + final Boolean bypassStackOutOfSyncError = null; + Response response = deleteAtManagementGroupWithResponse(managementGroupId, deploymentStackName, + unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateStackAtManagementGroupWithResponseAsync(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - return Mono - .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - if (deploymentStackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - return Mono - .error(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.validateStackAtManagementGroup(this.client.getEndpoint(), managementGroupId, - deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteAtManagementGroup(String managementGroupId, + String deploymentStackName, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + Response response = deleteAtManagementGroupWithResponse(managementGroupId, deploymentStackName, + unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result along with {@link Response}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response validateStackAtManagementGroupWithResponse(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } - final String accept = "application/json"; - return service.validateStackAtManagementGroupSync(this.client.getEndpoint(), managementGroupId, - deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, Context.NONE); + private Mono deleteAtManagementGroupAsync(String managementGroupId, String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + return beginDeleteAtManagementGroupAsync(managementGroupId, deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result along with {@link Response}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response validateStackAtManagementGroupWithResponse(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (managementGroupId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); - } - if (deploymentStackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStackName is required and cannot be null.")); - } - if (deploymentStack == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter deploymentStack is required and cannot be null.")); - } else { - deploymentStack.validate(); - } - final String accept = "application/json"; - return service.validateStackAtManagementGroupSync(this.client.getEndpoint(), managementGroupId, - deploymentStackName, this.client.getApiVersion(), deploymentStack, accept, context); + private Mono deleteAtManagementGroupAsync(String managementGroupId, String deploymentStackName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; + final Boolean bypassStackOutOfSyncError = null; + return beginDeleteAtManagementGroupAsync(managementGroupId, deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the Deployment stack validation result. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DeploymentStackValidateResultInner> - beginValidateStackAtManagementGroupAsync(String managementGroupId, String deploymentStackName, - DeploymentStackInner deploymentStack) { - Mono>> mono - = validateStackAtManagementGroupWithResponseAsync(managementGroupId, deploymentStackName, deploymentStack); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DeploymentStackValidateResultInner.class, - DeploymentStackValidateResultInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAtManagementGroup(String managementGroupId, String deploymentStackName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; + final Boolean bypassStackOutOfSyncError = null; + beginDeleteAtManagementGroup(managementGroupId, deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError).getFinalResult(); } /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the Deployment stack validation result. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeploymentStackValidateResultInner> - beginValidateStackAtManagementGroup(String managementGroupId, String deploymentStackName, - DeploymentStackInner deploymentStack) { - Response response - = validateStackAtManagementGroupWithResponse(managementGroupId, deploymentStackName, deploymentStack); - return this.client.getLroResult( - response, DeploymentStackValidateResultInner.class, DeploymentStackValidateResultInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAtManagementGroup(String managementGroupId, String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + beginDeleteAtManagementGroup(managementGroupId, deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError, context).getFinalResult(); } /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the Deployment stack validation result. + * @return export Template specific properties of the Deployment stack along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeploymentStackValidateResultInner> - beginValidateStackAtManagementGroup(String managementGroupId, String deploymentStackName, - DeploymentStackInner deploymentStack, Context context) { - Response response = validateStackAtManagementGroupWithResponse(managementGroupId, - deploymentStackName, deploymentStack, context); - return this.client.getLroResult( - response, DeploymentStackValidateResultInner.class, DeploymentStackValidateResultInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + exportTemplateAtManagementGroupWithResponseAsync(String managementGroupId, String deploymentStackName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.exportTemplateAtManagementGroup(this.client.getEndpoint(), + this.client.getApiVersion(), managementGroupId, deploymentStackName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result on successful completion of {@link Mono}. + * @return export Template specific properties of the Deployment stack on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateStackAtManagementGroupAsync(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack) { - return beginValidateStackAtManagementGroupAsync(managementGroupId, deploymentStackName, deploymentStack).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono exportTemplateAtManagementGroupAsync(String managementGroupId, + String deploymentStackName) { + return exportTemplateAtManagementGroupWithResponseAsync(managementGroupId, deploymentStackName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return export Template specific properties of the Deployment stack along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackValidateResultInner validateStackAtManagementGroup(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack) { - return beginValidateStackAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack) - .getFinalResult(); + public Response exportTemplateAtManagementGroupWithResponse( + String managementGroupId, String deploymentStackName, Context context) { + final String accept = "application/json"; + return service.exportTemplateAtManagementGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, deploymentStackName, accept, context); } /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return export Template specific properties of the Deployment stack. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentStackValidateResultInner validateStackAtManagementGroup(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { - return beginValidateStackAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack, context) - .getFinalResult(); + public DeploymentStackTemplateDefinitionInner exportTemplateAtManagementGroup(String managementGroupId, + String deploymentStackName) { + return exportTemplateAtManagementGroupWithResponse(managementGroupId, deploymentStackName, Context.NONE) + .getValue(); } /** @@ -3978,17 +3340,11 @@ public DeploymentStackValidateResultInner validateStackAtManagementGroup(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtResourceGroupNextSinglePageAsync(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( @@ -4005,19 +3361,10 @@ private Mono> listAtResourceGroupNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listAtResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listAtResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -4033,19 +3380,10 @@ private PagedResponse listAtResourceGroupNextSinglePage(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listAtResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listAtResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -4060,17 +3398,11 @@ private PagedResponse listAtResourceGroupNextSinglePage(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtSubscriptionNextSinglePageAsync(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( @@ -4087,19 +3419,10 @@ private Mono> listAtSubscriptionNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listAtSubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listAtSubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -4115,19 +3438,10 @@ private PagedResponse listAtSubscriptionNextSinglePage(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listAtSubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listAtSubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -4142,17 +3456,11 @@ private PagedResponse listAtSubscriptionNextSinglePage(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAtManagementGroupNextSinglePageAsync(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( @@ -4169,19 +3477,10 @@ private Mono> listAtManagementGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listAtManagementGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listAtManagementGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -4197,25 +3496,14 @@ private PagedResponse listAtManagementGroupNextSinglePage( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks along with {@link PagedResponse}. + * @return the response of a DeploymentStack list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listAtManagementGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listAtManagementGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(DeploymentStacksClientImpl.class); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksImpl.java index 9ed6c375d7d4..861e7daccb3e 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksImpl.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.implementation; @@ -17,9 +17,8 @@ import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackTemplateDefinition; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackValidateResult; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacks; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionManagementGroupMode; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionResourceGroupMode; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionResourceMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; public final class DeploymentStacksImpl implements DeploymentStacks { private static final ClientLogger LOGGER = new ClientLogger(DeploymentStacksImpl.class); @@ -34,54 +33,55 @@ public DeploymentStacksImpl(DeploymentStacksClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentStackImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentStackImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentStackImpl(inner1, this.manager())); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String deploymentStackName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, deploymentStackName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeploymentStackImpl(inner.getValue(), this.manager())); + } else { + return null; + } } - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentStackImpl(inner1, this.manager())); + public DeploymentStack getByResourceGroup(String resourceGroupName, String deploymentStackName) { + DeploymentStackInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, deploymentStackName); + if (inner != null) { + return new DeploymentStackImpl(inner, this.manager()); + } else { + return null; + } } - public PagedIterable listAtManagementGroup(String managementGroupId) { - PagedIterable inner = this.serviceClient().listAtManagementGroup(managementGroupId); + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentStackImpl(inner1, this.manager())); } - public PagedIterable listAtManagementGroup(String managementGroupId, Context context) { + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner - = this.serviceClient().listAtManagementGroup(managementGroupId, context); + = this.serviceClient().listByResourceGroup(resourceGroupName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentStackImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse(String resourceGroupName, - String deploymentStackName, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, deploymentStackName, context); + public DeploymentStackValidateResult validateStackAtResourceGroup(String resourceGroupName, + String deploymentStackName, DeploymentStackInner deploymentStack) { + DeploymentStackValidateResultInner inner = this.serviceClient() + .validateStackAtResourceGroup(resourceGroupName, deploymentStackName, deploymentStack); if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeploymentStackImpl(inner.getValue(), this.manager())); + return new DeploymentStackValidateResultImpl(inner, this.manager()); } else { return null; } } - public DeploymentStack getByResourceGroup(String resourceGroupName, String deploymentStackName) { - DeploymentStackInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, deploymentStackName); + public DeploymentStackValidateResult validateStackAtResourceGroup(String resourceGroupName, + String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { + DeploymentStackValidateResultInner inner = this.serviceClient() + .validateStackAtResourceGroup(resourceGroupName, deploymentStackName, deploymentStack, context); if (inner != null) { - return new DeploymentStackImpl(inner, this.manager()); + return new DeploymentStackValidateResultImpl(inner, this.manager()); } else { return null; } @@ -92,32 +92,35 @@ public void delete(String resourceGroupName, String deploymentStackName) { } public void delete(String resourceGroupName, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context) { + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { this.serviceClient() .delete(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, - unmanageActionManagementGroups, bypassStackOutOfSyncError, context); + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, + context); } - public DeploymentStack createOrUpdateAtSubscription(String deploymentStackName, - DeploymentStackInner deploymentStack) { - DeploymentStackInner inner - = this.serviceClient().createOrUpdateAtSubscription(deploymentStackName, deploymentStack); + public Response exportTemplateAtResourceGroupWithResponse( + String resourceGroupName, String deploymentStackName, Context context) { + Response inner = this.serviceClient() + .exportTemplateAtResourceGroupWithResponse(resourceGroupName, deploymentStackName, context); if (inner != null) { - return new DeploymentStackImpl(inner, this.manager()); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeploymentStackTemplateDefinitionImpl(inner.getValue(), this.manager())); } else { return null; } } - public DeploymentStack createOrUpdateAtSubscription(String deploymentStackName, - DeploymentStackInner deploymentStack, Context context) { - DeploymentStackInner inner - = this.serviceClient().createOrUpdateAtSubscription(deploymentStackName, deploymentStack, context); + public DeploymentStackTemplateDefinition exportTemplateAtResourceGroup(String resourceGroupName, + String deploymentStackName) { + DeploymentStackTemplateDefinitionInner inner + = this.serviceClient().exportTemplateAtResourceGroup(resourceGroupName, deploymentStackName); if (inner != null) { - return new DeploymentStackImpl(inner, this.manager()); + return new DeploymentStackTemplateDefinitionImpl(inner, this.manager()); } else { return null; } @@ -143,55 +146,53 @@ public DeploymentStack getAtSubscription(String deploymentStackName) { } } - public void deleteAtSubscription(String deploymentStackName) { - this.serviceClient().deleteAtSubscription(deploymentStackName); + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentStackImpl(inner1, this.manager())); } - public void deleteAtSubscription(String deploymentStackName, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context) { - this.serviceClient() - .deleteAtSubscription(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, - unmanageActionManagementGroups, bypassStackOutOfSyncError, context); + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentStackImpl(inner1, this.manager())); } - public DeploymentStack createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, + public DeploymentStackValidateResult validateStackAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack) { - DeploymentStackInner inner = this.serviceClient() - .createOrUpdateAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack); + DeploymentStackValidateResultInner inner + = this.serviceClient().validateStackAtSubscription(deploymentStackName, deploymentStack); if (inner != null) { - return new DeploymentStackImpl(inner, this.manager()); + return new DeploymentStackValidateResultImpl(inner, this.manager()); } else { return null; } } - public DeploymentStack createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, + public DeploymentStackValidateResult validateStackAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { - DeploymentStackInner inner = this.serviceClient() - .createOrUpdateAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack, context); + DeploymentStackValidateResultInner inner + = this.serviceClient().validateStackAtSubscription(deploymentStackName, deploymentStack, context); if (inner != null) { - return new DeploymentStackImpl(inner, this.manager()); + return new DeploymentStackValidateResultImpl(inner, this.manager()); } else { return null; } } - public Response getAtManagementGroupWithResponse(String managementGroupId, - String deploymentStackName, Context context) { - Response inner - = this.serviceClient().getAtManagementGroupWithResponse(managementGroupId, deploymentStackName, context); + public DeploymentStack createOrUpdateAtSubscription(String deploymentStackName, + DeploymentStackInner deploymentStack) { + DeploymentStackInner inner + = this.serviceClient().createOrUpdateAtSubscription(deploymentStackName, deploymentStack); if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeploymentStackImpl(inner.getValue(), this.manager())); + return new DeploymentStackImpl(inner, this.manager()); } else { return null; } } - public DeploymentStack getAtManagementGroup(String managementGroupId, String deploymentStackName) { - DeploymentStackInner inner = this.serviceClient().getAtManagementGroup(managementGroupId, deploymentStackName); + public DeploymentStack createOrUpdateAtSubscription(String deploymentStackName, + DeploymentStackInner deploymentStack, Context context) { + DeploymentStackInner inner + = this.serviceClient().createOrUpdateAtSubscription(deploymentStackName, deploymentStack, context); if (inner != null) { return new DeploymentStackImpl(inner, this.manager()); } else { @@ -199,41 +200,20 @@ public DeploymentStack getAtManagementGroup(String managementGroupId, String dep } } - public void deleteAtManagementGroup(String managementGroupId, String deploymentStackName) { - this.serviceClient().deleteAtManagementGroup(managementGroupId, deploymentStackName); + public void deleteAtSubscription(String deploymentStackName) { + this.serviceClient().deleteAtSubscription(deploymentStackName); } - public void deleteAtManagementGroup(String managementGroupId, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context) { + public void deleteAtSubscription(String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { this.serviceClient() - .deleteAtManagementGroup(managementGroupId, deploymentStackName, unmanageActionResources, - unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError, context); - } - - public Response exportTemplateAtResourceGroupWithResponse( - String resourceGroupName, String deploymentStackName, Context context) { - Response inner = this.serviceClient() - .exportTemplateAtResourceGroupWithResponse(resourceGroupName, deploymentStackName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeploymentStackTemplateDefinitionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DeploymentStackTemplateDefinition exportTemplateAtResourceGroup(String resourceGroupName, - String deploymentStackName) { - DeploymentStackTemplateDefinitionInner inner - = this.serviceClient().exportTemplateAtResourceGroup(resourceGroupName, deploymentStackName); - if (inner != null) { - return new DeploymentStackTemplateDefinitionImpl(inner, this.manager()); - } else { - return null; - } + .deleteAtSubscription(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, + context); } public Response @@ -258,33 +238,42 @@ public DeploymentStackTemplateDefinition exportTemplateAtSubscription(String dep } } - public Response exportTemplateAtManagementGroupWithResponse( - String managementGroupId, String deploymentStackName, Context context) { - Response inner = this.serviceClient() - .exportTemplateAtManagementGroupWithResponse(managementGroupId, deploymentStackName, context); + public Response getAtManagementGroupWithResponse(String managementGroupId, + String deploymentStackName, Context context) { + Response inner + = this.serviceClient().getAtManagementGroupWithResponse(managementGroupId, deploymentStackName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeploymentStackTemplateDefinitionImpl(inner.getValue(), this.manager())); + new DeploymentStackImpl(inner.getValue(), this.manager())); } else { return null; } } - public DeploymentStackTemplateDefinition exportTemplateAtManagementGroup(String managementGroupId, - String deploymentStackName) { - DeploymentStackTemplateDefinitionInner inner - = this.serviceClient().exportTemplateAtManagementGroup(managementGroupId, deploymentStackName); + public DeploymentStack getAtManagementGroup(String managementGroupId, String deploymentStackName) { + DeploymentStackInner inner = this.serviceClient().getAtManagementGroup(managementGroupId, deploymentStackName); if (inner != null) { - return new DeploymentStackTemplateDefinitionImpl(inner, this.manager()); + return new DeploymentStackImpl(inner, this.manager()); } else { return null; } } - public DeploymentStackValidateResult validateStackAtResourceGroup(String resourceGroupName, + public PagedIterable listAtManagementGroup(String managementGroupId) { + PagedIterable inner = this.serviceClient().listAtManagementGroup(managementGroupId); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentStackImpl(inner1, this.manager())); + } + + public PagedIterable listAtManagementGroup(String managementGroupId, Context context) { + PagedIterable inner + = this.serviceClient().listAtManagementGroup(managementGroupId, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentStackImpl(inner1, this.manager())); + } + + public DeploymentStackValidateResult validateStackAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack) { DeploymentStackValidateResultInner inner = this.serviceClient() - .validateStackAtResourceGroup(resourceGroupName, deploymentStackName, deploymentStack); + .validateStackAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack); if (inner != null) { return new DeploymentStackValidateResultImpl(inner, this.manager()); } else { @@ -292,10 +281,10 @@ public DeploymentStackValidateResult validateStackAtResourceGroup(String resourc } } - public DeploymentStackValidateResult validateStackAtResourceGroup(String resourceGroupName, + public DeploymentStackValidateResult validateStackAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { DeploymentStackValidateResultInner inner = this.serviceClient() - .validateStackAtResourceGroup(resourceGroupName, deploymentStackName, deploymentStack, context); + .validateStackAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack, context); if (inner != null) { return new DeploymentStackValidateResultImpl(inner, this.manager()); } else { @@ -303,45 +292,62 @@ public DeploymentStackValidateResult validateStackAtResourceGroup(String resourc } } - public DeploymentStackValidateResult validateStackAtSubscription(String deploymentStackName, + public DeploymentStack createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack) { - DeploymentStackValidateResultInner inner - = this.serviceClient().validateStackAtSubscription(deploymentStackName, deploymentStack); + DeploymentStackInner inner = this.serviceClient() + .createOrUpdateAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack); if (inner != null) { - return new DeploymentStackValidateResultImpl(inner, this.manager()); + return new DeploymentStackImpl(inner, this.manager()); } else { return null; } } - public DeploymentStackValidateResult validateStackAtSubscription(String deploymentStackName, + public DeploymentStack createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { - DeploymentStackValidateResultInner inner - = this.serviceClient().validateStackAtSubscription(deploymentStackName, deploymentStack, context); + DeploymentStackInner inner = this.serviceClient() + .createOrUpdateAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack, context); if (inner != null) { - return new DeploymentStackValidateResultImpl(inner, this.manager()); + return new DeploymentStackImpl(inner, this.manager()); } else { return null; } } - public DeploymentStackValidateResult validateStackAtManagementGroup(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack) { - DeploymentStackValidateResultInner inner = this.serviceClient() - .validateStackAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack); + public void deleteAtManagementGroup(String managementGroupId, String deploymentStackName) { + this.serviceClient().deleteAtManagementGroup(managementGroupId, deploymentStackName); + } + + public void deleteAtManagementGroup(String managementGroupId, String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + this.serviceClient() + .deleteAtManagementGroup(managementGroupId, deploymentStackName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, context); + } + + public Response exportTemplateAtManagementGroupWithResponse( + String managementGroupId, String deploymentStackName, Context context) { + Response inner = this.serviceClient() + .exportTemplateAtManagementGroupWithResponse(managementGroupId, deploymentStackName, context); if (inner != null) { - return new DeploymentStackValidateResultImpl(inner, this.manager()); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeploymentStackTemplateDefinitionImpl(inner.getValue(), this.manager())); } else { return null; } } - public DeploymentStackValidateResult validateStackAtManagementGroup(String managementGroupId, - String deploymentStackName, DeploymentStackInner deploymentStack, Context context) { - DeploymentStackValidateResultInner inner = this.serviceClient() - .validateStackAtManagementGroup(managementGroupId, deploymentStackName, deploymentStack, context); + public DeploymentStackTemplateDefinition exportTemplateAtManagementGroup(String managementGroupId, + String deploymentStackName) { + DeploymentStackTemplateDefinitionInner inner + = this.serviceClient().exportTemplateAtManagementGroup(managementGroupId, deploymentStackName); if (inner != null) { - return new DeploymentStackValidateResultImpl(inner, this.manager()); + return new DeploymentStackTemplateDefinitionImpl(inner, this.manager()); } else { return null; } @@ -386,19 +392,21 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'deploymentStacks'.", id))); } - UnmanageActionResourceMode localUnmanageActionResources = null; - UnmanageActionResourceGroupMode localUnmanageActionResourceGroups = null; - UnmanageActionManagementGroupMode localUnmanageActionManagementGroups = null; + DeploymentStacksDeleteDetachEnum localUnmanageActionResources = null; + DeploymentStacksDeleteDetachEnum localUnmanageActionResourceGroups = null; + DeploymentStacksDeleteDetachEnum localUnmanageActionManagementGroups = null; + DeploymentStacksResourcesWithoutDeleteSupportEnum localUnmanageActionResourcesWithoutDeleteSupport = null; Boolean localBypassStackOutOfSyncError = null; this.delete(resourceGroupName, deploymentStackName, localUnmanageActionResources, - localUnmanageActionResourceGroups, localUnmanageActionManagementGroups, localBypassStackOutOfSyncError, - Context.NONE); + localUnmanageActionResourceGroups, localUnmanageActionManagementGroups, + localUnmanageActionResourcesWithoutDeleteSupport, localBypassStackOutOfSyncError, Context.NONE); } - public void deleteByIdWithResponse(String id, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context) { + public void deleteByIdWithResponse(String id, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -410,7 +418,8 @@ public void deleteByIdWithResponse(String id, UnmanageActionResourceMode unmanag String.format("The resource ID '%s' is not valid. Missing path segment 'deploymentStacks'.", id))); } this.delete(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, - unmanageActionManagementGroups, bypassStackOutOfSyncError, context); + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, + context); } private DeploymentStacksClient serviceClient() { diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientBuilder.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientBuilder.java index 2fda40a72533..8eb8290d12fd 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientBuilder.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { DeploymentStacksManagementClientImpl.class }) public final class DeploymentStacksManagementClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the DeploymentStacksManagementClientBuilder. */ - public DeploymentStacksManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public DeploymentStacksManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the DeploymentStacksManagementClientBuilder. */ - public DeploymentStacksManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public DeploymentStacksManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public DeploymentStacksManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); DeploymentStacksManagementClientImpl client = new DeploymentStacksManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientImpl.java index dfb83d94b6b3..52311dea75a6 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientImpl.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.implementation; @@ -28,6 +28,9 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient; import com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksManagementClient; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -43,26 +46,12 @@ @ServiceClient(builder = DeploymentStacksManagementClientBuilder.class) public final class DeploymentStacksManagementClientImpl implements DeploymentStacksManagementClient { /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -71,12 +60,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -84,6 +73,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -126,6 +129,48 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** + * The DeploymentStacksWhatIfResultsAtResourceGroupsClient object to access its operations. + */ + private final DeploymentStacksWhatIfResultsAtResourceGroupsClient deploymentStacksWhatIfResultsAtResourceGroups; + + /** + * Gets the DeploymentStacksWhatIfResultsAtResourceGroupsClient object to access its operations. + * + * @return the DeploymentStacksWhatIfResultsAtResourceGroupsClient object. + */ + public DeploymentStacksWhatIfResultsAtResourceGroupsClient getDeploymentStacksWhatIfResultsAtResourceGroups() { + return this.deploymentStacksWhatIfResultsAtResourceGroups; + } + + /** + * The DeploymentStacksWhatIfResultsAtSubscriptionsClient object to access its operations. + */ + private final DeploymentStacksWhatIfResultsAtSubscriptionsClient deploymentStacksWhatIfResultsAtSubscriptions; + + /** + * Gets the DeploymentStacksWhatIfResultsAtSubscriptionsClient object to access its operations. + * + * @return the DeploymentStacksWhatIfResultsAtSubscriptionsClient object. + */ + public DeploymentStacksWhatIfResultsAtSubscriptionsClient getDeploymentStacksWhatIfResultsAtSubscriptions() { + return this.deploymentStacksWhatIfResultsAtSubscriptions; + } + + /** + * The DeploymentStacksWhatIfResultsAtManagementGroupsClient object to access its operations. + */ + private final DeploymentStacksWhatIfResultsAtManagementGroupsClient deploymentStacksWhatIfResultsAtManagementGroups; + + /** + * Gets the DeploymentStacksWhatIfResultsAtManagementGroupsClient object to access its operations. + * + * @return the DeploymentStacksWhatIfResultsAtManagementGroupsClient object. + */ + public DeploymentStacksWhatIfResultsAtManagementGroupsClient getDeploymentStacksWhatIfResultsAtManagementGroups() { + return this.deploymentStacksWhatIfResultsAtManagementGroups; + } + /** * The DeploymentStacksClient object to access its operations. */ @@ -147,17 +192,23 @@ public DeploymentStacksClient getDeploymentStacks() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. + * @param endpoint Service host. * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. */ DeploymentStacksManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-03-01"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2025-07-01"; + this.deploymentStacksWhatIfResultsAtResourceGroups + = new DeploymentStacksWhatIfResultsAtResourceGroupsClientImpl(this); + this.deploymentStacksWhatIfResultsAtSubscriptions + = new DeploymentStacksWhatIfResultsAtSubscriptionsClientImpl(this); + this.deploymentStacksWhatIfResultsAtManagementGroups + = new DeploymentStacksWhatIfResultsAtManagementGroupsClientImpl(this); this.deploymentStacks = new DeploymentStacksClientImpl(this); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultImpl.java new file mode 100644 index 000000000000..99795c26ae68 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultImpl.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResult; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; +import java.util.Collections; +import java.util.Map; + +public final class DeploymentStacksWhatIfResultImpl implements DeploymentStacksWhatIfResult, + DeploymentStacksWhatIfResult.Definition, DeploymentStacksWhatIfResult.Update { + private DeploymentStacksWhatIfResultInner innerObject; + + private final com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public DeploymentStacksWhatIfResultProperties properties() { + return this.innerModel().properties(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public DeploymentStacksWhatIfResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String deploymentStacksWhatIfResultName; + + public DeploymentStacksWhatIfResultImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public DeploymentStacksWhatIfResult create() { + this.innerObject = serviceManager.serviceClient() + .getDeploymentStacksWhatIfResultsAtResourceGroups() + .createOrUpdate(resourceGroupName, deploymentStacksWhatIfResultName, this.innerModel(), Context.NONE); + return this; + } + + public DeploymentStacksWhatIfResult create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDeploymentStacksWhatIfResultsAtResourceGroups() + .createOrUpdate(resourceGroupName, deploymentStacksWhatIfResultName, this.innerModel(), context); + return this; + } + + DeploymentStacksWhatIfResultImpl(String name, + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager serviceManager) { + this.innerObject = new DeploymentStacksWhatIfResultInner(); + this.serviceManager = serviceManager; + this.deploymentStacksWhatIfResultName = name; + } + + public DeploymentStacksWhatIfResultImpl update() { + return this; + } + + public DeploymentStacksWhatIfResult apply() { + this.innerObject = serviceManager.serviceClient() + .getDeploymentStacksWhatIfResultsAtResourceGroups() + .createOrUpdate(resourceGroupName, deploymentStacksWhatIfResultName, this.innerModel(), Context.NONE); + return this; + } + + public DeploymentStacksWhatIfResult apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDeploymentStacksWhatIfResultsAtResourceGroups() + .createOrUpdate(resourceGroupName, deploymentStacksWhatIfResultName, this.innerModel(), context); + return this; + } + + DeploymentStacksWhatIfResultImpl(DeploymentStacksWhatIfResultInner innerObject, + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.deploymentStacksWhatIfResultName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "deploymentStacksWhatIfResults"); + } + + public DeploymentStacksWhatIfResult refresh() { + this.innerObject = serviceManager.serviceClient() + .getDeploymentStacksWhatIfResultsAtResourceGroups() + .getByResourceGroupWithResponse(resourceGroupName, deploymentStacksWhatIfResultName, Context.NONE) + .getValue(); + return this; + } + + public DeploymentStacksWhatIfResult refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDeploymentStacksWhatIfResultsAtResourceGroups() + .getByResourceGroupWithResponse(resourceGroupName, deploymentStacksWhatIfResultName, context) + .getValue(); + return this; + } + + public DeploymentStacksWhatIfResult whatIf() { + return serviceManager.deploymentStacksWhatIfResultsAtResourceGroups() + .whatIf(resourceGroupName, deploymentStacksWhatIfResultName); + } + + public DeploymentStacksWhatIfResult whatIf(Context context) { + return serviceManager.deploymentStacksWhatIfResultsAtResourceGroups() + .whatIf(resourceGroupName, deploymentStacksWhatIfResultName, context); + } + + public DeploymentStacksWhatIfResultImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public DeploymentStacksWhatIfResultImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public DeploymentStacksWhatIfResultImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public DeploymentStacksWhatIfResultImpl withProperties(DeploymentStacksWhatIfResultProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsClientImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsClientImpl.java new file mode 100644 index 000000000000..ba57e5c38aaa --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsClientImpl.java @@ -0,0 +1,881 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.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.PathParam; +import com.azure.core.annotation.Post; +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.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +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.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.implementation.models.DeploymentStacksWhatIfResultListResult; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; +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 + * DeploymentStacksWhatIfResultsAtManagementGroupsClient. + */ +public final class DeploymentStacksWhatIfResultsAtManagementGroupsClientImpl + implements DeploymentStacksWhatIfResultsAtManagementGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final DeploymentStacksWhatIfResultsAtManagementGroupsService service; + + /** + * The service client containing this operation class. + */ + private final DeploymentStacksManagementClientImpl client; + + /** + * Initializes an instance of DeploymentStacksWhatIfResultsAtManagementGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DeploymentStacksWhatIfResultsAtManagementGroupsClientImpl(DeploymentStacksManagementClientImpl client) { + this.service = RestProxy.create(DeploymentStacksWhatIfResultsAtManagementGroupsService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for + * DeploymentStacksManagementClientDeploymentStacksWhatIfResultsAtManagementGroups to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "DeploymentStacksManagementClientDeploymentStacksWhatIfResultsAtManagementGroups") + public interface DeploymentStacksWhatIfResultsAtManagementGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStacksWhatIfResultInner resource, Context context); + + @Put("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStacksWhatIfResultInner resource, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @QueryParam("unmanageAction.Resources") DeploymentStacksDeleteDetachEnum unmanageActionResources, + @QueryParam("unmanageAction.ResourceGroups") DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + @QueryParam("unmanageAction.ManagementGroups") DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + @QueryParam("unmanageAction.ResourcesWithoutDeleteSupport") DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @QueryParam("unmanageAction.Resources") DeploymentStacksDeleteDetachEnum unmanageActionResources, + @QueryParam("unmanageAction.ResourceGroups") DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + @QueryParam("unmanageAction.ManagementGroups") DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + @QueryParam("unmanageAction.ResourcesWithoutDeleteSupport") DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}/whatIf") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> whatIf(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}/whatIf") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response whatIfSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String managementGroupId, + String deploymentStacksWhatIfResultName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, deploymentStacksWhatIfResultName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String managementGroupId, + String deploymentStacksWhatIfResultName) { + return getWithResponseAsync(managementGroupId, deploymentStacksWhatIfResultName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String managementGroupId, + String deploymentStacksWhatIfResultName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), managementGroupId, + deploymentStacksWhatIfResultName, accept, context); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner get(String managementGroupId, String deploymentStacksWhatIfResultName) { + return getWithResponse(managementGroupId, deploymentStacksWhatIfResultName, Context.NONE).getValue(); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String managementGroupId) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, 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())); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String managementGroupId) { + return new PagedFlux<>(() -> listSinglePageAsync(managementGroupId), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String managementGroupId) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), managementGroupId, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String managementGroupId, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), managementGroupId, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String managementGroupId) { + return new PagedIterable<>(() -> listSinglePage(managementGroupId), nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String managementGroupId, Context context) { + return new PagedIterable<>(() -> listSinglePage(managementGroupId, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String managementGroupId, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, deploymentStacksWhatIfResultName, contentType, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String managementGroupId, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), managementGroupId, + deploymentStacksWhatIfResultName, contentType, accept, resource, Context.NONE); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String managementGroupId, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), managementGroupId, + deploymentStacksWhatIfResultName, contentType, accept, resource, context); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DeploymentStacksWhatIfResultInner> + beginCreateOrUpdateAsync(String managementGroupId, String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(managementGroupId, deploymentStacksWhatIfResultName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DeploymentStacksWhatIfResultInner.class, + DeploymentStacksWhatIfResultInner.class, this.client.getContext()); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DeploymentStacksWhatIfResultInner> + beginCreateOrUpdate(String managementGroupId, String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource) { + Response response + = createOrUpdateWithResponse(managementGroupId, deploymentStacksWhatIfResultName, resource); + return this.client.getLroResult(response, + DeploymentStacksWhatIfResultInner.class, DeploymentStacksWhatIfResultInner.class, Context.NONE); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DeploymentStacksWhatIfResultInner> + beginCreateOrUpdate(String managementGroupId, String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource, Context context) { + Response response + = createOrUpdateWithResponse(managementGroupId, deploymentStacksWhatIfResultName, resource, context); + return this.client.getLroResult(response, + DeploymentStacksWhatIfResultInner.class, DeploymentStacksWhatIfResultInner.class, context); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String managementGroupId, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource) { + return beginCreateOrUpdateAsync(managementGroupId, deploymentStacksWhatIfResultName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner createOrUpdate(String managementGroupId, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource) { + return beginCreateOrUpdate(managementGroupId, deploymentStacksWhatIfResultName, resource).getFinalResult(); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner createOrUpdate(String managementGroupId, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource, Context context) { + return beginCreateOrUpdate(managementGroupId, deploymentStacksWhatIfResultName, resource, context) + .getFinalResult(); + } + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managementGroupId, + String deploymentStacksWhatIfResultName, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, deploymentStacksWhatIfResultName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String managementGroupId, String deploymentStacksWhatIfResultName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; + final Boolean bypassStackOutOfSyncError = null; + return deleteWithResponseAsync(managementGroupId, deploymentStacksWhatIfResultName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String managementGroupId, String deploymentStacksWhatIfResultName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), managementGroupId, + deploymentStacksWhatIfResultName, unmanageActionResources, unmanageActionResourceGroups, + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, + context); + } + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managementGroupId, String deploymentStacksWhatIfResultName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; + final Boolean bypassStackOutOfSyncError = null; + deleteWithResponse(managementGroupId, deploymentStacksWhatIfResultName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError, Context.NONE); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> whatIfWithResponseAsync(String managementGroupId, + String deploymentStacksWhatIfResultName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.whatIf(this.client.getEndpoint(), this.client.getApiVersion(), + managementGroupId, deploymentStacksWhatIfResultName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response whatIfWithResponse(String managementGroupId, String deploymentStacksWhatIfResultName) { + final String accept = "application/json"; + return service.whatIfSync(this.client.getEndpoint(), this.client.getApiVersion(), managementGroupId, + deploymentStacksWhatIfResultName, accept, Context.NONE); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response whatIfWithResponse(String managementGroupId, String deploymentStacksWhatIfResultName, + Context context) { + final String accept = "application/json"; + return service.whatIfSync(this.client.getEndpoint(), this.client.getApiVersion(), managementGroupId, + deploymentStacksWhatIfResultName, accept, context); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIfAsync(String managementGroupId, String deploymentStacksWhatIfResultName) { + Mono>> mono + = whatIfWithResponseAsync(managementGroupId, deploymentStacksWhatIfResultName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DeploymentStacksWhatIfResultInner.class, + DeploymentStacksWhatIfResultInner.class, this.client.getContext()); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIf(String managementGroupId, String deploymentStacksWhatIfResultName) { + Response response = whatIfWithResponse(managementGroupId, deploymentStacksWhatIfResultName); + return this.client.getLroResult(response, + DeploymentStacksWhatIfResultInner.class, DeploymentStacksWhatIfResultInner.class, Context.NONE); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIf(String managementGroupId, String deploymentStacksWhatIfResultName, Context context) { + Response response + = whatIfWithResponse(managementGroupId, deploymentStacksWhatIfResultName, context); + return this.client.getLroResult(response, + DeploymentStacksWhatIfResultInner.class, DeploymentStacksWhatIfResultInner.class, context); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono whatIfAsync(String managementGroupId, + String deploymentStacksWhatIfResultName) { + return beginWhatIfAsync(managementGroupId, deploymentStacksWhatIfResultName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner whatIf(String managementGroupId, String deploymentStacksWhatIfResultName) { + return beginWhatIf(managementGroupId, deploymentStacksWhatIfResultName).getFinalResult(); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner whatIf(String managementGroupId, String deploymentStacksWhatIfResultName, + Context context) { + return beginWhatIf(managementGroupId, deploymentStacksWhatIfResultName, context).getFinalResult(); + } + + /** + * 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsImpl.java new file mode 100644 index 000000000000..c769f42ef20d --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsImpl.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResult; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultsAtManagementGroups; + +public final class DeploymentStacksWhatIfResultsAtManagementGroupsImpl + implements DeploymentStacksWhatIfResultsAtManagementGroups { + private static final ClientLogger LOGGER + = new ClientLogger(DeploymentStacksWhatIfResultsAtManagementGroupsImpl.class); + + private final DeploymentStacksWhatIfResultsAtManagementGroupsClient innerClient; + + private final com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager serviceManager; + + public DeploymentStacksWhatIfResultsAtManagementGroupsImpl( + DeploymentStacksWhatIfResultsAtManagementGroupsClient innerClient, + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String managementGroupId, + String deploymentStacksWhatIfResultName, Context context) { + Response inner + = this.serviceClient().getWithResponse(managementGroupId, deploymentStacksWhatIfResultName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeploymentStacksWhatIfResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DeploymentStacksWhatIfResult get(String managementGroupId, String deploymentStacksWhatIfResultName) { + DeploymentStacksWhatIfResultInner inner + = this.serviceClient().get(managementGroupId, deploymentStacksWhatIfResultName); + if (inner != null) { + return new DeploymentStacksWhatIfResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String managementGroupId) { + PagedIterable inner = this.serviceClient().list(managementGroupId); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DeploymentStacksWhatIfResultImpl(inner1, this.manager())); + } + + public PagedIterable list(String managementGroupId, Context context) { + PagedIterable inner = this.serviceClient().list(managementGroupId, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DeploymentStacksWhatIfResultImpl(inner1, this.manager())); + } + + public DeploymentStacksWhatIfResult createOrUpdate(String managementGroupId, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource) { + DeploymentStacksWhatIfResultInner inner + = this.serviceClient().createOrUpdate(managementGroupId, deploymentStacksWhatIfResultName, resource); + if (inner != null) { + return new DeploymentStacksWhatIfResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public DeploymentStacksWhatIfResult createOrUpdate(String managementGroupId, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource, Context context) { + DeploymentStacksWhatIfResultInner inner = this.serviceClient() + .createOrUpdate(managementGroupId, deploymentStacksWhatIfResultName, resource, context); + if (inner != null) { + return new DeploymentStacksWhatIfResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse(String managementGroupId, String deploymentStacksWhatIfResultName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + return this.serviceClient() + .deleteWithResponse(managementGroupId, deploymentStacksWhatIfResultName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, context); + } + + public void delete(String managementGroupId, String deploymentStacksWhatIfResultName) { + this.serviceClient().delete(managementGroupId, deploymentStacksWhatIfResultName); + } + + public DeploymentStacksWhatIfResult whatIf(String managementGroupId, String deploymentStacksWhatIfResultName) { + DeploymentStacksWhatIfResultInner inner + = this.serviceClient().whatIf(managementGroupId, deploymentStacksWhatIfResultName); + if (inner != null) { + return new DeploymentStacksWhatIfResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public DeploymentStacksWhatIfResult whatIf(String managementGroupId, String deploymentStacksWhatIfResultName, + Context context) { + DeploymentStacksWhatIfResultInner inner + = this.serviceClient().whatIf(managementGroupId, deploymentStacksWhatIfResultName, context); + if (inner != null) { + return new DeploymentStacksWhatIfResultImpl(inner, this.manager()); + } else { + return null; + } + } + + private DeploymentStacksWhatIfResultsAtManagementGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsClientImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsClientImpl.java new file mode 100644 index 000000000000..f03e81591c79 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsClientImpl.java @@ -0,0 +1,903 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.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.PathParam; +import com.azure.core.annotation.Post; +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.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +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.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.implementation.models.DeploymentStacksWhatIfResultListResult; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; +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 + * DeploymentStacksWhatIfResultsAtResourceGroupsClient. + */ +public final class DeploymentStacksWhatIfResultsAtResourceGroupsClientImpl + implements DeploymentStacksWhatIfResultsAtResourceGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final DeploymentStacksWhatIfResultsAtResourceGroupsService service; + + /** + * The service client containing this operation class. + */ + private final DeploymentStacksManagementClientImpl client; + + /** + * Initializes an instance of DeploymentStacksWhatIfResultsAtResourceGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DeploymentStacksWhatIfResultsAtResourceGroupsClientImpl(DeploymentStacksManagementClientImpl client) { + this.service = RestProxy.create(DeploymentStacksWhatIfResultsAtResourceGroupsService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for + * DeploymentStacksManagementClientDeploymentStacksWhatIfResultsAtResourceGroups to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "DeploymentStacksManagementClientDeploymentStacksWhatIfResultsAtResourceGroups") + public interface DeploymentStacksWhatIfResultsAtResourceGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacksWhatIfResults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacksWhatIfResults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStacksWhatIfResultInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStacksWhatIfResultInner resource, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @QueryParam("unmanageAction.Resources") DeploymentStacksDeleteDetachEnum unmanageActionResources, + @QueryParam("unmanageAction.ResourceGroups") DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + @QueryParam("unmanageAction.ManagementGroups") DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + @QueryParam("unmanageAction.ResourcesWithoutDeleteSupport") DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @QueryParam("unmanageAction.Resources") DeploymentStacksDeleteDetachEnum unmanageActionResources, + @QueryParam("unmanageAction.ResourceGroups") DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + @QueryParam("unmanageAction.ManagementGroups") DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + @QueryParam("unmanageAction.ResourcesWithoutDeleteSupport") DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}/whatIf") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> whatIf(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}/whatIf") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response whatIfSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getByResourceGroupWithResponseAsync(String resourceGroupName, String deploymentStacksWhatIfResultName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStacksWhatIfResultName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String deploymentStacksWhatIfResultName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, deploymentStacksWhatIfResultName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String deploymentStacksWhatIfResultName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStacksWhatIfResultName, accept, context); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner getByResourceGroup(String resourceGroupName, + String deploymentStacksWhatIfResultName) { + return getByResourceGroupWithResponse(resourceGroupName, deploymentStacksWhatIfResultName, Context.NONE) + .getValue(); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStacksWhatIfResultName, contentType, + accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStacksWhatIfResultName, contentType, accept, + resource, Context.NONE); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStacksWhatIfResultName, contentType, accept, + resource, context); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DeploymentStacksWhatIfResultInner> + beginCreateOrUpdateAsync(String resourceGroupName, String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, deploymentStacksWhatIfResultName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DeploymentStacksWhatIfResultInner.class, + DeploymentStacksWhatIfResultInner.class, this.client.getContext()); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DeploymentStacksWhatIfResultInner> + beginCreateOrUpdate(String resourceGroupName, String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource) { + Response response + = createOrUpdateWithResponse(resourceGroupName, deploymentStacksWhatIfResultName, resource); + return this.client.getLroResult(response, + DeploymentStacksWhatIfResultInner.class, DeploymentStacksWhatIfResultInner.class, Context.NONE); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DeploymentStacksWhatIfResultInner> + beginCreateOrUpdate(String resourceGroupName, String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, deploymentStacksWhatIfResultName, resource, context); + return this.client.getLroResult(response, + DeploymentStacksWhatIfResultInner.class, DeploymentStacksWhatIfResultInner.class, context); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, deploymentStacksWhatIfResultName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner createOrUpdate(String resourceGroupName, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource) { + return beginCreateOrUpdate(resourceGroupName, deploymentStacksWhatIfResultName, resource).getFinalResult(); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner createOrUpdate(String resourceGroupName, + String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, deploymentStacksWhatIfResultName, resource, context) + .getFinalResult(); + } + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deploymentStacksWhatIfResultName, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStacksWhatIfResultName, + unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String deploymentStacksWhatIfResultName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; + final Boolean bypassStackOutOfSyncError = null; + return deleteWithResponseAsync(resourceGroupName, deploymentStacksWhatIfResultName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String deploymentStacksWhatIfResultName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStacksWhatIfResultName, + unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, context); + } + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deploymentStacksWhatIfResultName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; + final Boolean bypassStackOutOfSyncError = null; + deleteWithResponse(resourceGroupName, deploymentStacksWhatIfResultName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError, Context.NONE); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> whatIfWithResponseAsync(String resourceGroupName, + String deploymentStacksWhatIfResultName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.whatIf(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStacksWhatIfResultName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response whatIfWithResponse(String resourceGroupName, String deploymentStacksWhatIfResultName) { + final String accept = "application/json"; + return service.whatIfSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStacksWhatIfResultName, accept, Context.NONE); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response whatIfWithResponse(String resourceGroupName, String deploymentStacksWhatIfResultName, + Context context) { + final String accept = "application/json"; + return service.whatIfSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentStacksWhatIfResultName, accept, context); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIfAsync(String resourceGroupName, String deploymentStacksWhatIfResultName) { + Mono>> mono + = whatIfWithResponseAsync(resourceGroupName, deploymentStacksWhatIfResultName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DeploymentStacksWhatIfResultInner.class, + DeploymentStacksWhatIfResultInner.class, this.client.getContext()); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIf(String resourceGroupName, String deploymentStacksWhatIfResultName) { + Response response = whatIfWithResponse(resourceGroupName, deploymentStacksWhatIfResultName); + return this.client.getLroResult(response, + DeploymentStacksWhatIfResultInner.class, DeploymentStacksWhatIfResultInner.class, Context.NONE); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIf(String resourceGroupName, String deploymentStacksWhatIfResultName, Context context) { + Response response + = whatIfWithResponse(resourceGroupName, deploymentStacksWhatIfResultName, context); + return this.client.getLroResult(response, + DeploymentStacksWhatIfResultInner.class, DeploymentStacksWhatIfResultInner.class, context); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono whatIfAsync(String resourceGroupName, + String deploymentStacksWhatIfResultName) { + return beginWhatIfAsync(resourceGroupName, deploymentStacksWhatIfResultName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner whatIf(String resourceGroupName, String deploymentStacksWhatIfResultName) { + return beginWhatIf(resourceGroupName, deploymentStacksWhatIfResultName).getFinalResult(); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner whatIf(String resourceGroupName, String deploymentStacksWhatIfResultName, + Context context) { + return beginWhatIf(resourceGroupName, deploymentStacksWhatIfResultName, context).getFinalResult(); + } + + /** + * 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsImpl.java new file mode 100644 index 000000000000..f9c32e49b602 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsImpl.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResult; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultsAtResourceGroups; + +public final class DeploymentStacksWhatIfResultsAtResourceGroupsImpl + implements DeploymentStacksWhatIfResultsAtResourceGroups { + private static final ClientLogger LOGGER + = new ClientLogger(DeploymentStacksWhatIfResultsAtResourceGroupsImpl.class); + + private final DeploymentStacksWhatIfResultsAtResourceGroupsClient innerClient; + + private final com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager serviceManager; + + public DeploymentStacksWhatIfResultsAtResourceGroupsImpl( + DeploymentStacksWhatIfResultsAtResourceGroupsClient innerClient, + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String deploymentStacksWhatIfResultName, Context context) { + Response inner = this.serviceClient() + .getByResourceGroupWithResponse(resourceGroupName, deploymentStacksWhatIfResultName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeploymentStacksWhatIfResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DeploymentStacksWhatIfResult getByResourceGroup(String resourceGroupName, + String deploymentStacksWhatIfResultName) { + DeploymentStacksWhatIfResultInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, deploymentStacksWhatIfResultName); + if (inner != null) { + return new DeploymentStacksWhatIfResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DeploymentStacksWhatIfResultImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DeploymentStacksWhatIfResultImpl(inner1, this.manager())); + } + + public Response deleteWithResponse(String resourceGroupName, String deploymentStacksWhatIfResultName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + return this.serviceClient() + .deleteWithResponse(resourceGroupName, deploymentStacksWhatIfResultName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, context); + } + + public void delete(String resourceGroupName, String deploymentStacksWhatIfResultName) { + this.serviceClient().delete(resourceGroupName, deploymentStacksWhatIfResultName); + } + + public DeploymentStacksWhatIfResult whatIf(String resourceGroupName, String deploymentStacksWhatIfResultName) { + DeploymentStacksWhatIfResultInner inner + = this.serviceClient().whatIf(resourceGroupName, deploymentStacksWhatIfResultName); + if (inner != null) { + return new DeploymentStacksWhatIfResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public DeploymentStacksWhatIfResult whatIf(String resourceGroupName, String deploymentStacksWhatIfResultName, + Context context) { + DeploymentStacksWhatIfResultInner inner + = this.serviceClient().whatIf(resourceGroupName, deploymentStacksWhatIfResultName, context); + if (inner != null) { + return new DeploymentStacksWhatIfResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public DeploymentStacksWhatIfResult getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String deploymentStacksWhatIfResultName + = ResourceManagerUtils.getValueFromIdByName(id, "deploymentStacksWhatIfResults"); + if (deploymentStacksWhatIfResultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'deploymentStacksWhatIfResults'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, deploymentStacksWhatIfResultName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String deploymentStacksWhatIfResultName + = ResourceManagerUtils.getValueFromIdByName(id, "deploymentStacksWhatIfResults"); + if (deploymentStacksWhatIfResultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'deploymentStacksWhatIfResults'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, deploymentStacksWhatIfResultName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String deploymentStacksWhatIfResultName + = ResourceManagerUtils.getValueFromIdByName(id, "deploymentStacksWhatIfResults"); + if (deploymentStacksWhatIfResultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'deploymentStacksWhatIfResults'.", id))); + } + DeploymentStacksDeleteDetachEnum localUnmanageActionResources = null; + DeploymentStacksDeleteDetachEnum localUnmanageActionResourceGroups = null; + DeploymentStacksDeleteDetachEnum localUnmanageActionManagementGroups = null; + DeploymentStacksResourcesWithoutDeleteSupportEnum localUnmanageActionResourcesWithoutDeleteSupport = null; + Boolean localBypassStackOutOfSyncError = null; + this.deleteWithResponse(resourceGroupName, deploymentStacksWhatIfResultName, localUnmanageActionResources, + localUnmanageActionResourceGroups, localUnmanageActionManagementGroups, + localUnmanageActionResourcesWithoutDeleteSupport, localBypassStackOutOfSyncError, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String deploymentStacksWhatIfResultName + = ResourceManagerUtils.getValueFromIdByName(id, "deploymentStacksWhatIfResults"); + if (deploymentStacksWhatIfResultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'deploymentStacksWhatIfResults'.", id))); + } + return this.deleteWithResponse(resourceGroupName, deploymentStacksWhatIfResultName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError, context); + } + + private DeploymentStacksWhatIfResultsAtResourceGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager() { + return this.serviceManager; + } + + public DeploymentStacksWhatIfResultImpl define(String name) { + return new DeploymentStacksWhatIfResultImpl(name, this.manager()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsClientImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsClientImpl.java new file mode 100644 index 000000000000..d64e303a7e52 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsClientImpl.java @@ -0,0 +1,831 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.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.PathParam; +import com.azure.core.annotation.Post; +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.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +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.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.implementation.models.DeploymentStacksWhatIfResultListResult; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; +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 + * DeploymentStacksWhatIfResultsAtSubscriptionsClient. + */ +public final class DeploymentStacksWhatIfResultsAtSubscriptionsClientImpl + implements DeploymentStacksWhatIfResultsAtSubscriptionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final DeploymentStacksWhatIfResultsAtSubscriptionsService service; + + /** + * The service client containing this operation class. + */ + private final DeploymentStacksManagementClientImpl client; + + /** + * Initializes an instance of DeploymentStacksWhatIfResultsAtSubscriptionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DeploymentStacksWhatIfResultsAtSubscriptionsClientImpl(DeploymentStacksManagementClientImpl client) { + this.service = RestProxy.create(DeploymentStacksWhatIfResultsAtSubscriptionsService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for + * DeploymentStacksManagementClientDeploymentStacksWhatIfResultsAtSubscriptions to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "DeploymentStacksManagementClientDeploymentStacksWhatIfResultsAtSubscriptions") + public interface DeploymentStacksWhatIfResultsAtSubscriptionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStacksWhatIfResultInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentStacksWhatIfResultInner resource, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @QueryParam("unmanageAction.Resources") DeploymentStacksDeleteDetachEnum unmanageActionResources, + @QueryParam("unmanageAction.ResourceGroups") DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + @QueryParam("unmanageAction.ManagementGroups") DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + @QueryParam("unmanageAction.ResourcesWithoutDeleteSupport") DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @QueryParam("unmanageAction.Resources") DeploymentStacksDeleteDetachEnum unmanageActionResources, + @QueryParam("unmanageAction.ResourceGroups") DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + @QueryParam("unmanageAction.ManagementGroups") DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + @QueryParam("unmanageAction.ResourcesWithoutDeleteSupport") DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + @QueryParam("bypassStackOutOfSyncError") Boolean bypassStackOutOfSyncError, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}/whatIf") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> whatIf(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacksWhatIfResults/{deploymentStacksWhatIfResultName}/whatIf") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response whatIfSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("deploymentStacksWhatIfResultName") String deploymentStacksWhatIfResultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getWithResponseAsync(String deploymentStacksWhatIfResultName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStacksWhatIfResultName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String deploymentStacksWhatIfResultName) { + return getWithResponseAsync(deploymentStacksWhatIfResultName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String deploymentStacksWhatIfResultName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + deploymentStacksWhatIfResultName, accept, context); + } + + /** + * Gets the Deployment stack with the given name. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner get(String deploymentStacksWhatIfResultName) { + return getWithResponse(deploymentStacksWhatIfResultName, Context.NONE).getValue(); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists Deployment stacks at the specified scope. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStacksWhatIfResultName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStacksWhatIfResultName, contentType, accept, resource, + Context.NONE); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStacksWhatIfResultName, contentType, accept, resource, context); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DeploymentStacksWhatIfResultInner> + beginCreateOrUpdateAsync(String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(deploymentStacksWhatIfResultName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DeploymentStacksWhatIfResultInner.class, + DeploymentStacksWhatIfResultInner.class, this.client.getContext()); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DeploymentStacksWhatIfResultInner> + beginCreateOrUpdate(String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource) { + Response response = createOrUpdateWithResponse(deploymentStacksWhatIfResultName, resource); + return this.client.getLroResult(response, + DeploymentStacksWhatIfResultInner.class, DeploymentStacksWhatIfResultInner.class, Context.NONE); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deployment stack object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DeploymentStacksWhatIfResultInner> + beginCreateOrUpdate(String deploymentStacksWhatIfResultName, DeploymentStacksWhatIfResultInner resource, + Context context) { + Response response = createOrUpdateWithResponse(deploymentStacksWhatIfResultName, resource, context); + return this.client.getLroResult(response, + DeploymentStacksWhatIfResultInner.class, DeploymentStacksWhatIfResultInner.class, context); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource) { + return beginCreateOrUpdateAsync(deploymentStacksWhatIfResultName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner createOrUpdate(String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource) { + return beginCreateOrUpdate(deploymentStacksWhatIfResultName, resource).getFinalResult(); + } + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner createOrUpdate(String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource, Context context) { + return beginCreateOrUpdate(deploymentStacksWhatIfResultName, resource, context).getFinalResult(); + } + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deploymentStacksWhatIfResultName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStacksWhatIfResultName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, + unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String deploymentStacksWhatIfResultName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; + final Boolean bypassStackOutOfSyncError = null; + return deleteWithResponseAsync(deploymentStacksWhatIfResultName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String deploymentStacksWhatIfResultName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStacksWhatIfResultName, unmanageActionResources, + unmanageActionResourceGroups, unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, + bypassStackOutOfSyncError, context); + } + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deploymentStacksWhatIfResultName) { + final DeploymentStacksDeleteDetachEnum unmanageActionResources = null; + final DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups = null; + final DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups = null; + final DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport = null; + final Boolean bypassStackOutOfSyncError = null; + deleteWithResponse(deploymentStacksWhatIfResultName, unmanageActionResources, unmanageActionResourceGroups, + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, + Context.NONE); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> whatIfWithResponseAsync(String deploymentStacksWhatIfResultName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.whatIf(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStacksWhatIfResultName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response whatIfWithResponse(String deploymentStacksWhatIfResultName) { + final String accept = "application/json"; + return service.whatIfSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStacksWhatIfResultName, accept, Context.NONE); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response whatIfWithResponse(String deploymentStacksWhatIfResultName, Context context) { + final String accept = "application/json"; + return service.whatIfSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), deploymentStacksWhatIfResultName, accept, context); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIfAsync(String deploymentStacksWhatIfResultName) { + Mono>> mono = whatIfWithResponseAsync(deploymentStacksWhatIfResultName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DeploymentStacksWhatIfResultInner.class, + DeploymentStacksWhatIfResultInner.class, this.client.getContext()); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIf(String deploymentStacksWhatIfResultName) { + Response response = whatIfWithResponse(deploymentStacksWhatIfResultName); + return this.client.getLroResult(response, + DeploymentStacksWhatIfResultInner.class, DeploymentStacksWhatIfResultInner.class, Context.NONE); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, DeploymentStacksWhatIfResultInner> + beginWhatIf(String deploymentStacksWhatIfResultName, Context context) { + Response response = whatIfWithResponse(deploymentStacksWhatIfResultName, context); + return this.client.getLroResult(response, + DeploymentStacksWhatIfResultInner.class, DeploymentStacksWhatIfResultInner.class, context); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono whatIfAsync(String deploymentStacksWhatIfResultName) { + return beginWhatIfAsync(deploymentStacksWhatIfResultName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner whatIf(String deploymentStacksWhatIfResultName) { + return beginWhatIf(deploymentStacksWhatIfResultName).getFinalResult(); + } + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentStacksWhatIfResultInner whatIf(String deploymentStacksWhatIfResultName, Context context) { + return beginWhatIf(deploymentStacksWhatIfResultName, context).getFinalResult(); + } + + /** + * 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsImpl.java new file mode 100644 index 000000000000..4b6b2d8bd25e --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsImpl.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResult; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultsAtSubscriptions; + +public final class DeploymentStacksWhatIfResultsAtSubscriptionsImpl + implements DeploymentStacksWhatIfResultsAtSubscriptions { + private static final ClientLogger LOGGER = new ClientLogger(DeploymentStacksWhatIfResultsAtSubscriptionsImpl.class); + + private final DeploymentStacksWhatIfResultsAtSubscriptionsClient innerClient; + + private final com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager serviceManager; + + public DeploymentStacksWhatIfResultsAtSubscriptionsImpl( + DeploymentStacksWhatIfResultsAtSubscriptionsClient innerClient, + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String deploymentStacksWhatIfResultName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(deploymentStacksWhatIfResultName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeploymentStacksWhatIfResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DeploymentStacksWhatIfResult get(String deploymentStacksWhatIfResultName) { + DeploymentStacksWhatIfResultInner inner = this.serviceClient().get(deploymentStacksWhatIfResultName); + if (inner != null) { + return new DeploymentStacksWhatIfResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DeploymentStacksWhatIfResultImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DeploymentStacksWhatIfResultImpl(inner1, this.manager())); + } + + public DeploymentStacksWhatIfResult createOrUpdate(String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource) { + DeploymentStacksWhatIfResultInner inner + = this.serviceClient().createOrUpdate(deploymentStacksWhatIfResultName, resource); + if (inner != null) { + return new DeploymentStacksWhatIfResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public DeploymentStacksWhatIfResult createOrUpdate(String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource, Context context) { + DeploymentStacksWhatIfResultInner inner + = this.serviceClient().createOrUpdate(deploymentStacksWhatIfResultName, resource, context); + if (inner != null) { + return new DeploymentStacksWhatIfResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse(String deploymentStacksWhatIfResultName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context) { + return this.serviceClient() + .deleteWithResponse(deploymentStacksWhatIfResultName, unmanageActionResources, unmanageActionResourceGroups, + unmanageActionManagementGroups, unmanageActionResourcesWithoutDeleteSupport, bypassStackOutOfSyncError, + context); + } + + public void delete(String deploymentStacksWhatIfResultName) { + this.serviceClient().delete(deploymentStacksWhatIfResultName); + } + + public DeploymentStacksWhatIfResult whatIf(String deploymentStacksWhatIfResultName) { + DeploymentStacksWhatIfResultInner inner = this.serviceClient().whatIf(deploymentStacksWhatIfResultName); + if (inner != null) { + return new DeploymentStacksWhatIfResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public DeploymentStacksWhatIfResult whatIf(String deploymentStacksWhatIfResultName, Context context) { + DeploymentStacksWhatIfResultInner inner + = this.serviceClient().whatIf(deploymentStacksWhatIfResultName, context); + if (inner != null) { + return new DeploymentStacksWhatIfResultImpl(inner, this.manager()); + } else { + return null; + } + } + + private DeploymentStacksWhatIfResultsAtSubscriptionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/ResourceManagerUtils.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/ResourceManagerUtils.java index da09250f1211..459ba2252b34 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/ResourceManagerUtils.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.implementation; diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackListResult.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/models/DeploymentStackListResult.java similarity index 80% rename from sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackListResult.java rename to sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/models/DeploymentStackListResult.java index 1f9910d06079..beae5fa7a789 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackListResult.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/models/DeploymentStackListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.resources.deploymentstacks.models; +package com.azure.resourcemanager.resources.deploymentstacks.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -14,17 +14,17 @@ import java.util.List; /** - * List of Deployment stacks. + * The response of a DeploymentStack list operation. */ @Immutable public final class DeploymentStackListResult implements JsonSerializable { /* - * An array of Deployment stacks. + * The DeploymentStack items on this page */ private List value; /* - * The URL to use for getting the next set of results. + * The link to the next page of items */ private String nextLink; @@ -35,7 +35,7 @@ private DeploymentStackListResult() { } /** - * Get the value property: An array of Deployment stacks. + * Get the value property: The DeploymentStack items on this page. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The URL to use for getting the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,17 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -70,6 +59,7 @@ public void validate() { 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(); } @@ -79,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DeploymentStackListResult 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 DeploymentStackListResult. */ public static DeploymentStackListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/models/DeploymentStacksWhatIfResultListResult.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/models/DeploymentStacksWhatIfResultListResult.java new file mode 100644 index 000000000000..0e9f0a911a78 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/models/DeploymentStacksWhatIfResultListResult.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.implementation.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 com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a DeploymentStacksWhatIfResult list operation. + */ +@Immutable +public final class DeploymentStacksWhatIfResultListResult + implements JsonSerializable { + /* + * The DeploymentStacksWhatIfResult items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of DeploymentStacksWhatIfResultListResult class. + */ + private DeploymentStacksWhatIfResultListResult() { + } + + /** + * Get the value property: The DeploymentStacksWhatIfResult items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 DeploymentStacksWhatIfResultListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksWhatIfResultListResult 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 DeploymentStacksWhatIfResultListResult. + */ + public static DeploymentStacksWhatIfResultListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksWhatIfResultListResult deserializedDeploymentStacksWhatIfResultListResult + = new DeploymentStacksWhatIfResultListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DeploymentStacksWhatIfResultInner.fromJson(reader1)); + deserializedDeploymentStacksWhatIfResultListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksWhatIfResultListResult; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/package-info.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/package-info.java index 6e05efb04883..596dd4d0968d 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/package-info.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/package-info.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the implementations for DeploymentStacksManagementClient. - * DeploymentStacks Client. + * The APIs listed in this specification can be used to manage Deployment stack resources through the Azure Resource + * Manager. */ package com.azure.resourcemanager.resources.deploymentstacks.implementation; diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ActionOnUnmanage.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ActionOnUnmanage.java index f0b53013ff72..4548e21b9663 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ActionOnUnmanage.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ActionOnUnmanage.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.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; @@ -35,6 +34,11 @@ public final class ActionOnUnmanage implements JsonSerializable { - AzureResourceBase deserializedAzureResourceBase = new AzureResourceBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedAzureResourceBase.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedAzureResourceBase.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedAzureResourceBase.type = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedAzureResourceBase.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureResourceBase; - }); - } -} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettings.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettings.java index 8f8233439b9f..6a3a30246102 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettings.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettings.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.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; @@ -142,20 +141,6 @@ public DenySettings withApplyToChildScopes(Boolean applyToChildScopes) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (mode() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property mode in model DenySettings")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DenySettings.class); - /** * {@inheritDoc} */ diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettingsMode.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettingsMode.java index 4f201633ebe1..47ff357902ee 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettingsMode.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettingsMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; @@ -12,17 +12,17 @@ */ public final class DenySettingsMode extends ExpandableStringEnum { /** - * Static value denyDelete for DenySettingsMode. + * Authorized users are able to read and modify the resources, but cannot delete. */ public static final DenySettingsMode DENY_DELETE = fromString("denyDelete"); /** - * Static value denyWriteAndDelete for DenySettingsMode. + * Authorized users can read from a resource, but cannot modify or delete it. */ public static final DenySettingsMode DENY_WRITE_AND_DELETE = fromString("denyWriteAndDelete"); /** - * Static value none for DenySettingsMode. + * No denyAssignments have been applied. */ public static final DenySettingsMode NONE = fromString("none"); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenyStatusMode.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenyStatusMode.java index 6a12f5d9084b..0e66fbdae1e3 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenyStatusMode.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenyStatusMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; @@ -12,35 +12,40 @@ */ public final class DenyStatusMode extends ExpandableStringEnum { /** - * Static value denyDelete for DenyStatusMode. + * Authorized users are able to read and modify the resources, but cannot delete. */ public static final DenyStatusMode DENY_DELETE = fromString("denyDelete"); /** - * Static value notSupported for DenyStatusMode. + * Resource type does not support denyAssignments. */ public static final DenyStatusMode NOT_SUPPORTED = fromString("notSupported"); /** - * Static value inapplicable for DenyStatusMode. + * denyAssignments are not supported on resources outside the scope of the deployment stack. */ public static final DenyStatusMode INAPPLICABLE = fromString("inapplicable"); /** - * Static value denyWriteAndDelete for DenyStatusMode. + * Authorized users can only read from a resource, but cannot modify or delete it. */ public static final DenyStatusMode DENY_WRITE_AND_DELETE = fromString("denyWriteAndDelete"); /** - * Static value removedBySystem for DenyStatusMode. + * Deny assignment has been removed by Azure due to a resource management change (management group move, etc.). */ public static final DenyStatusMode REMOVED_BY_SYSTEM = fromString("removedBySystem"); /** - * Static value none for DenyStatusMode. + * No denyAssignments have been applied. */ public static final DenyStatusMode NONE = fromString("none"); + /** + * The denyAssignment status is unknown. + */ + public static final DenyStatusMode UNKNOWN = fromString("unknown"); + /** * Creates a new instance of DenyStatusMode value. * diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtension.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtension.java new file mode 100644 index 000000000000..e9c0e28d9aa3 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtension.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.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; + +/** + * Details about the usage of a deployment extension. + */ +@Immutable +public final class DeploymentExtension implements JsonSerializable { + /* + * The extension name. + */ + private String name; + + /* + * The extension version. + */ + private String version; + + /* + * The configuration ID of the extension usage. It uniquely identifies a target the extension deploys to. + */ + private String configId; + + /* + * The configuration used for deployment. The keys of this object should align with the extension config schema. + */ + private DeploymentExtensionConfig config; + + /** + * Creates an instance of DeploymentExtension class. + */ + private DeploymentExtension() { + } + + /** + * Get the name property: The extension name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the version property: The extension version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the configId property: The configuration ID of the extension usage. It uniquely identifies a target the + * extension deploys to. + * + * @return the configId value. + */ + public String configId() { + return this.configId; + } + + /** + * Get the config property: The configuration used for deployment. The keys of this object should align with the + * extension config schema. + * + * @return the config value. + */ + public DeploymentExtensionConfig config() { + return this.config; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("configId", this.configId); + jsonWriter.writeJsonField("config", this.config); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentExtension from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentExtension 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 DeploymentExtension. + */ + public static DeploymentExtension fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentExtension deserializedDeploymentExtension = new DeploymentExtension(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedDeploymentExtension.name = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedDeploymentExtension.version = reader.getString(); + } else if ("configId".equals(fieldName)) { + deserializedDeploymentExtension.configId = reader.getString(); + } else if ("config".equals(fieldName)) { + deserializedDeploymentExtension.config = DeploymentExtensionConfig.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentExtension; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfig.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfig.java new file mode 100644 index 000000000000..dd3780bf7616 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfig.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.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.LinkedHashMap; +import java.util.Map; + +/** + * The configuration of a deployment extension. The keys of this object should align with the extension config schema. + */ +@Fluent +public final class DeploymentExtensionConfig implements JsonSerializable { + /* + * The configuration of a deployment extension. The keys of this object should align with the extension config + * schema. + */ + private Map additionalProperties; + + /** + * Creates an instance of DeploymentExtensionConfig class. + */ + public DeploymentExtensionConfig() { + } + + /** + * Get the additionalProperties property: The configuration of a deployment extension. The keys of this object + * should align with the extension config schema. + * + * @return the additionalProperties value. + */ + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: The configuration of a deployment extension. The keys of this object + * should align with the extension config schema. + * + * @param additionalProperties the additionalProperties value to set. + * @return the DeploymentExtensionConfig object itself. + */ + public DeploymentExtensionConfig + withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (additionalProperties != null) { + for (Map.Entry additionalProperty : additionalProperties + .entrySet()) { + jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentExtensionConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentExtensionConfig 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 DeploymentExtensionConfig. + */ + public static DeploymentExtensionConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentExtensionConfig deserializedDeploymentExtensionConfig = new DeploymentExtensionConfig(); + Map additionalProperties = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if (additionalProperties == null) { + additionalProperties = new LinkedHashMap<>(); + } + + additionalProperties.put(fieldName, DeploymentExtensionConfigItem.fromJson(reader)); + } + deserializedDeploymentExtensionConfig.additionalProperties = additionalProperties; + + return deserializedDeploymentExtensionConfig; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfigItem.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfigItem.java new file mode 100644 index 000000000000..85fa9ccedd14 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfigItem.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.BinaryData; +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 value or how to get a value for an extension config property. + */ +@Fluent +public final class DeploymentExtensionConfigItem implements JsonSerializable { + /* + * The type of the value. + */ + private String type; + + /* + * The value of the config item. The type is determined by the extension config schema. + */ + private BinaryData value; + + /* + * The key vault reference of the config item. + */ + private KeyVaultParameterReference keyVaultReference; + + /** + * Creates an instance of DeploymentExtensionConfigItem class. + */ + public DeploymentExtensionConfigItem() { + } + + /** + * Get the type property: The type of the value. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the value property: The value of the config item. The type is determined by the extension config schema. + * + * @return the value value. + */ + public BinaryData value() { + return this.value; + } + + /** + * Set the value property: The value of the config item. The type is determined by the extension config schema. + * + * @param value the value value to set. + * @return the DeploymentExtensionConfigItem object itself. + */ + public DeploymentExtensionConfigItem withValue(BinaryData value) { + this.value = value; + return this; + } + + /** + * Get the keyVaultReference property: The key vault reference of the config item. + * + * @return the keyVaultReference value. + */ + public KeyVaultParameterReference keyVaultReference() { + return this.keyVaultReference; + } + + /** + * Set the keyVaultReference property: The key vault reference of the config item. + * + * @param keyVaultReference the keyVaultReference value to set. + * @return the DeploymentExtensionConfigItem object itself. + */ + public DeploymentExtensionConfigItem withKeyVaultReference(KeyVaultParameterReference keyVaultReference) { + this.keyVaultReference = keyVaultReference; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (this.value != null) { + jsonWriter.writeFieldName("value"); + this.value.writeTo(jsonWriter); + } + jsonWriter.writeJsonField("keyVaultReference", this.keyVaultReference); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentExtensionConfigItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentExtensionConfigItem 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 DeploymentExtensionConfigItem. + */ + public static DeploymentExtensionConfigItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentExtensionConfigItem deserializedDeploymentExtensionConfigItem + = new DeploymentExtensionConfigItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedDeploymentExtensionConfigItem.type = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedDeploymentExtensionConfigItem.value + = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + } else if ("keyVaultReference".equals(fieldName)) { + deserializedDeploymentExtensionConfigItem.keyVaultReference + = KeyVaultParameterReference.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentExtensionConfigItem; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInput.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInput.java new file mode 100644 index 000000000000..0221fc72cd06 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInput.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.BinaryData; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Deployment external input for parameterization. + */ +@Fluent +public final class DeploymentExternalInput implements JsonSerializable { + /* + * External input value. + */ + private BinaryData value; + + /** + * Creates an instance of DeploymentExternalInput class. + */ + public DeploymentExternalInput() { + } + + /** + * Get the value property: External input value. + * + * @return the value value. + */ + public BinaryData value() { + return this.value; + } + + /** + * Set the value property: External input value. + * + * @param value the value value to set. + * @return the DeploymentExternalInput object itself. + */ + public DeploymentExternalInput withValue(BinaryData value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeFieldName("value"); + this.value.writeTo(jsonWriter); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentExternalInput from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentExternalInput 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 DeploymentExternalInput. + */ + public static DeploymentExternalInput fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentExternalInput deserializedDeploymentExternalInput = new DeploymentExternalInput(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedDeploymentExternalInput.value + = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentExternalInput; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInputDefinition.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInputDefinition.java new file mode 100644 index 000000000000..c173f8866dde --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInputDefinition.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.BinaryData; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Deployment external input definition for parameterization. + */ +@Fluent +public final class DeploymentExternalInputDefinition implements JsonSerializable { + /* + * The kind of external input. + */ + private String kind; + + /* + * Configuration for the external input. + */ + private BinaryData config; + + /** + * Creates an instance of DeploymentExternalInputDefinition class. + */ + public DeploymentExternalInputDefinition() { + } + + /** + * Get the kind property: The kind of external input. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: The kind of external input. + * + * @param kind the kind value to set. + * @return the DeploymentExternalInputDefinition object itself. + */ + public DeploymentExternalInputDefinition withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the config property: Configuration for the external input. + * + * @return the config value. + */ + public BinaryData config() { + return this.config; + } + + /** + * Set the config property: Configuration for the external input. + * + * @param config the config value to set. + * @return the DeploymentExternalInputDefinition object itself. + */ + public DeploymentExternalInputDefinition withConfig(BinaryData config) { + this.config = config; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind); + if (this.config != null) { + jsonWriter.writeFieldName("config"); + this.config.writeTo(jsonWriter); + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentExternalInputDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentExternalInputDefinition 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 DeploymentExternalInputDefinition. + */ + public static DeploymentExternalInputDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentExternalInputDefinition deserializedDeploymentExternalInputDefinition + = new DeploymentExternalInputDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedDeploymentExternalInputDefinition.kind = reader.getString(); + } else if ("config".equals(fieldName)) { + deserializedDeploymentExternalInputDefinition.config + = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentExternalInputDefinition; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentParameter.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentParameter.java index 32ad809853d1..9a1b3cbf6554 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentParameter.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentParameter.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,7 +20,7 @@ public final class DeploymentParameter implements JsonSerializable BinaryData.fromObject(nonNullReader.readUntyped())); } else if ("type".equals(fieldName)) { deserializedDeploymentParameter.type = reader.getString(); } else if ("reference".equals(fieldName)) { deserializedDeploymentParameter.reference = KeyVaultParameterReference.fromJson(reader); + } else if ("expression".equals(fieldName)) { + deserializedDeploymentParameter.expression = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStack.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStack.java index d9390a16c659..ec16fac3b7aa 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStack.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStack.java @@ -1,14 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.management.SystemData; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; +import java.util.List; import java.util.Map; /** @@ -36,6 +39,21 @@ public interface DeploymentStack { */ String type(); + /** + * Gets the location property: The geo-location where the resource lives. Required for subscription and management + * group scoped stacks. The location is inherited from the resource group for resource group scoped stacks. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -44,26 +62,200 @@ public interface DeploymentStack { SystemData systemData(); /** - * Gets the location property: The location of the Deployment stack. It cannot be changed after creation. It must be - * one of the supported Azure locations. + * Gets the error property: The error detail. * - * @return the location value. + * @return the error value. */ - String location(); + ManagementError error(); /** - * Gets the tags property: Deployment stack resource tags. + * Gets the template property: The template content. You use this element when you want to pass the template syntax + * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. + * Use either the templateLink property or the template property, but not both. * - * @return the tags value. + * @return the template value. */ - Map tags(); + Map template(); + + /** + * Gets the templateLink property: The URI of the template. Use either the templateLink property or the template + * property, but not both. + * + * @return the templateLink value. + */ + DeploymentStacksTemplateLink templateLink(); + + /** + * Gets the parameters property: Name and value pairs that define the deployment parameters for the template. Use + * this element when providing the parameter values directly in the request, rather than linking to an existing + * parameter file. Use either the parametersLink property or the parameters property, but not both. + * + * @return the parameters value. + */ + Map parameters(); + + /** + * Gets the parametersLink property: The URI of parameters file. Use this element to link to an existing parameters + * file. Use either the parametersLink property or the parameters property, but not both. + * + * @return the parametersLink value. + */ + DeploymentStacksParametersLink parametersLink(); + + /** + * Gets the extensionConfigs property: The deployment extension configs. Keys of this object are extension aliases + * as defined in the deployment template. + * + * @return the extensionConfigs value. + */ + Map extensionConfigs(); + + /** + * Gets the externalInputs property: External input values, used by external tooling for parameter evaluation. + * + * @return the externalInputs value. + */ + Map externalInputs(); + + /** + * Gets the externalInputDefinitions property: External input definitions, used by external tooling to define + * expected external input values. + * + * @return the externalInputDefinitions value. + */ + Map externalInputDefinitions(); + + /** + * Gets the actionOnUnmanage property: Defines the behavior of resources that are no longer managed after the + * Deployment stack is updated or deleted. + * + * @return the actionOnUnmanage value. + */ + ActionOnUnmanage actionOnUnmanage(); + + /** + * Gets the debugSetting property: The debug setting of the deployment. + * + * @return the debugSetting value. + */ + DeploymentStacksDebugSetting debugSetting(); + + /** + * Gets the deploymentScope property: The scope at which the initial deployment should be created. If a scope is not + * specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + * + * @return the deploymentScope value. + */ + String deploymentScope(); + + /** + * Gets the description property: Deployment stack description. Max length of 4096 characters. + * + * @return the description value. + */ + String description(); + + /** + * Gets the denySettings property: Defines how resources deployed by the stack are locked. + * + * @return the denySettings value. + */ + DenySettings denySettings(); + + /** + * Gets the provisioningState property: State of the deployment stack. + * + * @return the provisioningState value. + */ + DeploymentStackProvisioningState provisioningState(); + + /** + * Gets the correlationId property: The correlation id of the last Deployment stack upsert or delete operation. It + * is in GUID format and is used for tracing. + * + * @return the correlationId value. + */ + String correlationId(); + + /** + * Gets the validationLevel property: The validation level of the deployment stack. + * + * @return the validationLevel value. + */ + ValidationLevel validationLevel(); + + /** + * Gets the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack resource list + * is not correctly synchronized. + * + * @return the bypassStackOutOfSyncError value. + */ + Boolean bypassStackOutOfSyncError(); + + /** + * Gets the detachedResources property: An array of resources that were detached during the most recent Deployment + * stack update. Detached means that the resource was removed from the template, but no relevant deletion operations + * were specified. So, the resource still exists while no longer being associated with the stack. + * + * @return the detachedResources value. + */ + List detachedResources(); + + /** + * Gets the deletedResources property: An array of resources that were deleted during the most recent Deployment + * stack update. Deleted means that the resource was removed from the template and relevant deletion operations were + * specified. + * + * @return the deletedResources value. + */ + List deletedResources(); + + /** + * Gets the failedResources property: An array of resources that failed to reach goal state during the most recent + * update. Each resourceId is accompanied by an error message. + * + * @return the failedResources value. + */ + List failedResources(); /** - * Gets the properties property: Deployment stack properties. + * Gets the resources property: An array of resources currently managed by the deployment stack. * - * @return the properties value. + * @return the resources value. */ - DeploymentStackProperties properties(); + List resources(); + + /** + * Gets the deploymentExtensions property: The extensions used during deployment. Contains extension data for all + * extensible resources managed by the stack. + * + * @return the deploymentExtensions value. + */ + List deploymentExtensions(); + + /** + * Gets the deploymentId property: The resourceId of the deployment resource created by the deployment stack. + * + * @return the deploymentId value. + */ + String deploymentId(); + + /** + * Gets the outputs property: The outputs of the deployment resource created by the deployment stack. + * + * @return the outputs value. + */ + Map outputs(); + + /** + * Gets the duration property: The duration of the last successful Deployment stack update. + * + * @return the duration value. + */ + String duration(); /** * Gets the region of the resource. @@ -127,8 +319,13 @@ interface WithResourceGroup { * The stage of the DeploymentStack definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithProperties { + interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, + DefinitionStages.WithError, DefinitionStages.WithTemplate, DefinitionStages.WithTemplateLink, + DefinitionStages.WithParameters, DefinitionStages.WithParametersLink, DefinitionStages.WithExtensionConfigs, + DefinitionStages.WithExternalInputs, DefinitionStages.WithExternalInputDefinitions, + DefinitionStages.WithActionOnUnmanage, DefinitionStages.WithDebugSetting, + DefinitionStages.WithDeploymentScope, DefinitionStages.WithDescription, DefinitionStages.WithDenySettings, + DefinitionStages.WithValidationLevel, DefinitionStages.WithBypassStackOutOfSyncError { /** * Executes the create request. * @@ -152,8 +349,8 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location The location of the Deployment stack. It cannot be changed after creation. It must be one - * of the supported Azure locations. + * @param location The geo-location where the resource lives. Required for subscription and management group + * scoped stacks. The location is inherited from the resource group for resource group scoped stacks. * @return the next definition stage. */ WithCreate withRegion(Region location); @@ -161,8 +358,8 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location The location of the Deployment stack. It cannot be changed after creation. It must be one - * of the supported Azure locations. + * @param location The geo-location where the resource lives. Required for subscription and management group + * scoped stacks. The location is inherited from the resource group for resource group scoped stacks. * @return the next definition stage. */ WithCreate withRegion(String location); @@ -173,25 +370,239 @@ interface WithLocation { */ interface WithTags { /** - * Specifies the tags property: Deployment stack resource tags.. + * Specifies the tags property: Resource tags.. * - * @param tags Deployment stack resource tags. + * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } /** - * The stage of the DeploymentStack definition allowing to specify properties. + * The stage of the DeploymentStack definition allowing to specify error. + */ + interface WithError { + /** + * Specifies the error property: The error detail.. + * + * @param error The error detail. + * @return the next definition stage. + */ + WithCreate withError(ManagementError error); + } + + /** + * The stage of the DeploymentStack definition allowing to specify template. + */ + interface WithTemplate { + /** + * Specifies the template property: The template content. You use this element when you want to pass the + * template syntax directly in the request rather than link to an existing template. It can be a JObject or + * well-formed JSON string. Use either the templateLink property or the template property, but not both.. + * + * @param template The template content. You use this element when you want to pass the template syntax + * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON + * string. Use either the templateLink property or the template property, but not both. + * @return the next definition stage. + */ + WithCreate withTemplate(Map template); + } + + /** + * The stage of the DeploymentStack definition allowing to specify templateLink. + */ + interface WithTemplateLink { + /** + * Specifies the templateLink property: The URI of the template. Use either the templateLink property or the + * template property, but not both.. + * + * @param templateLink The URI of the template. Use either the templateLink property or the template + * property, but not both. + * @return the next definition stage. + */ + WithCreate withTemplateLink(DeploymentStacksTemplateLink templateLink); + } + + /** + * The stage of the DeploymentStack definition allowing to specify parameters. + */ + interface WithParameters { + /** + * Specifies the parameters property: Name and value pairs that define the deployment parameters for the + * template. Use this element when providing the parameter values directly in the request, rather than + * linking to an existing parameter file. Use either the parametersLink property or the parameters property, + * but not both.. + * + * @param parameters Name and value pairs that define the deployment parameters for the template. Use this + * element when providing the parameter values directly in the request, rather than linking to an existing + * parameter file. Use either the parametersLink property or the parameters property, but not both. + * @return the next definition stage. + */ + WithCreate withParameters(Map parameters); + } + + /** + * The stage of the DeploymentStack definition allowing to specify parametersLink. + */ + interface WithParametersLink { + /** + * Specifies the parametersLink property: The URI of parameters file. Use this element to link to an + * existing parameters file. Use either the parametersLink property or the parameters property, but not + * both.. + * + * @param parametersLink The URI of parameters file. Use this element to link to an existing parameters + * file. Use either the parametersLink property or the parameters property, but not both. + * @return the next definition stage. + */ + WithCreate withParametersLink(DeploymentStacksParametersLink parametersLink); + } + + /** + * The stage of the DeploymentStack definition allowing to specify extensionConfigs. + */ + interface WithExtensionConfigs { + /** + * Specifies the extensionConfigs property: The deployment extension configs. Keys of this object are + * extension aliases as defined in the deployment template.. + * + * @param extensionConfigs The deployment extension configs. Keys of this object are extension aliases as + * defined in the deployment template. + * @return the next definition stage. + */ + WithCreate withExtensionConfigs(Map extensionConfigs); + } + + /** + * The stage of the DeploymentStack definition allowing to specify externalInputs. + */ + interface WithExternalInputs { + /** + * Specifies the externalInputs property: External input values, used by external tooling for parameter + * evaluation.. + * + * @param externalInputs External input values, used by external tooling for parameter evaluation. + * @return the next definition stage. + */ + WithCreate withExternalInputs(Map externalInputs); + } + + /** + * The stage of the DeploymentStack definition allowing to specify externalInputDefinitions. + */ + interface WithExternalInputDefinitions { + /** + * Specifies the externalInputDefinitions property: External input definitions, used by external tooling to + * define expected external input values.. + * + * @param externalInputDefinitions External input definitions, used by external tooling to define expected + * external input values. + * @return the next definition stage. + */ + WithCreate + withExternalInputDefinitions(Map externalInputDefinitions); + } + + /** + * The stage of the DeploymentStack definition allowing to specify actionOnUnmanage. + */ + interface WithActionOnUnmanage { + /** + * Specifies the actionOnUnmanage property: Defines the behavior of resources that are no longer managed + * after the Deployment stack is updated or deleted.. + * + * @param actionOnUnmanage Defines the behavior of resources that are no longer managed after the Deployment + * stack is updated or deleted. + * @return the next definition stage. + */ + WithCreate withActionOnUnmanage(ActionOnUnmanage actionOnUnmanage); + } + + /** + * The stage of the DeploymentStack definition allowing to specify debugSetting. + */ + interface WithDebugSetting { + /** + * Specifies the debugSetting property: The debug setting of the deployment.. + * + * @param debugSetting The debug setting of the deployment. + * @return the next definition stage. + */ + WithCreate withDebugSetting(DeploymentStacksDebugSetting debugSetting); + } + + /** + * The stage of the DeploymentStack definition allowing to specify deploymentScope. + */ + interface WithDeploymentScope { + /** + * Specifies the deploymentScope property: The scope at which the initial deployment should be created. If a + * scope is not specified, it will default to the scope of the deployment stack. Valid scopes are: + * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), + * subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').. + * + * @param deploymentScope The scope at which the initial deployment should be created. If a scope is not + * specified, it will default to the scope of the deployment stack. Valid scopes are: management group + * (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + * @return the next definition stage. + */ + WithCreate withDeploymentScope(String deploymentScope); + } + + /** + * The stage of the DeploymentStack definition allowing to specify description. + */ + interface WithDescription { + /** + * Specifies the description property: Deployment stack description. Max length of 4096 characters.. + * + * @param description Deployment stack description. Max length of 4096 characters. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + + /** + * The stage of the DeploymentStack definition allowing to specify denySettings. + */ + interface WithDenySettings { + /** + * Specifies the denySettings property: Defines how resources deployed by the stack are locked.. + * + * @param denySettings Defines how resources deployed by the stack are locked. + * @return the next definition stage. + */ + WithCreate withDenySettings(DenySettings denySettings); + } + + /** + * The stage of the DeploymentStack definition allowing to specify validationLevel. */ - interface WithProperties { + interface WithValidationLevel { /** - * Specifies the properties property: Deployment stack properties.. + * Specifies the validationLevel property: The validation level of the deployment stack. * - * @param properties Deployment stack properties. + * @param validationLevel The validation level of the deployment stack. * @return the next definition stage. */ - WithCreate withProperties(DeploymentStackProperties properties); + WithCreate withValidationLevel(ValidationLevel validationLevel); + } + + /** + * The stage of the DeploymentStack definition allowing to specify bypassStackOutOfSyncError. + */ + interface WithBypassStackOutOfSyncError { + /** + * Specifies the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack + * resource list is not correctly synchronized.. + * + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is + * not correctly synchronized. + * @return the next definition stage. + */ + WithCreate withBypassStackOutOfSyncError(Boolean bypassStackOutOfSyncError); } } @@ -205,7 +616,12 @@ interface WithProperties { /** * The template for DeploymentStack update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + interface Update + extends UpdateStages.WithTags, UpdateStages.WithError, UpdateStages.WithTemplate, UpdateStages.WithTemplateLink, + UpdateStages.WithParameters, UpdateStages.WithParametersLink, UpdateStages.WithExtensionConfigs, + UpdateStages.WithExternalInputs, UpdateStages.WithExternalInputDefinitions, UpdateStages.WithActionOnUnmanage, + UpdateStages.WithDebugSetting, UpdateStages.WithDeploymentScope, UpdateStages.WithDescription, + UpdateStages.WithDenySettings, UpdateStages.WithValidationLevel, UpdateStages.WithBypassStackOutOfSyncError { /** * Executes the update request. * @@ -231,25 +647,239 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Deployment stack resource tags.. + * Specifies the tags property: Resource tags.. * - * @param tags Deployment stack resource tags. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } /** - * The stage of the DeploymentStack update allowing to specify properties. + * The stage of the DeploymentStack update allowing to specify error. + */ + interface WithError { + /** + * Specifies the error property: The error detail.. + * + * @param error The error detail. + * @return the next definition stage. + */ + Update withError(ManagementError error); + } + + /** + * The stage of the DeploymentStack update allowing to specify template. + */ + interface WithTemplate { + /** + * Specifies the template property: The template content. You use this element when you want to pass the + * template syntax directly in the request rather than link to an existing template. It can be a JObject or + * well-formed JSON string. Use either the templateLink property or the template property, but not both.. + * + * @param template The template content. You use this element when you want to pass the template syntax + * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON + * string. Use either the templateLink property or the template property, but not both. + * @return the next definition stage. + */ + Update withTemplate(Map template); + } + + /** + * The stage of the DeploymentStack update allowing to specify templateLink. + */ + interface WithTemplateLink { + /** + * Specifies the templateLink property: The URI of the template. Use either the templateLink property or the + * template property, but not both.. + * + * @param templateLink The URI of the template. Use either the templateLink property or the template + * property, but not both. + * @return the next definition stage. + */ + Update withTemplateLink(DeploymentStacksTemplateLink templateLink); + } + + /** + * The stage of the DeploymentStack update allowing to specify parameters. + */ + interface WithParameters { + /** + * Specifies the parameters property: Name and value pairs that define the deployment parameters for the + * template. Use this element when providing the parameter values directly in the request, rather than + * linking to an existing parameter file. Use either the parametersLink property or the parameters property, + * but not both.. + * + * @param parameters Name and value pairs that define the deployment parameters for the template. Use this + * element when providing the parameter values directly in the request, rather than linking to an existing + * parameter file. Use either the parametersLink property or the parameters property, but not both. + * @return the next definition stage. + */ + Update withParameters(Map parameters); + } + + /** + * The stage of the DeploymentStack update allowing to specify parametersLink. + */ + interface WithParametersLink { + /** + * Specifies the parametersLink property: The URI of parameters file. Use this element to link to an + * existing parameters file. Use either the parametersLink property or the parameters property, but not + * both.. + * + * @param parametersLink The URI of parameters file. Use this element to link to an existing parameters + * file. Use either the parametersLink property or the parameters property, but not both. + * @return the next definition stage. + */ + Update withParametersLink(DeploymentStacksParametersLink parametersLink); + } + + /** + * The stage of the DeploymentStack update allowing to specify extensionConfigs. */ - interface WithProperties { + interface WithExtensionConfigs { /** - * Specifies the properties property: Deployment stack properties.. + * Specifies the extensionConfigs property: The deployment extension configs. Keys of this object are + * extension aliases as defined in the deployment template.. * - * @param properties Deployment stack properties. + * @param extensionConfigs The deployment extension configs. Keys of this object are extension aliases as + * defined in the deployment template. * @return the next definition stage. */ - Update withProperties(DeploymentStackProperties properties); + Update withExtensionConfigs(Map extensionConfigs); + } + + /** + * The stage of the DeploymentStack update allowing to specify externalInputs. + */ + interface WithExternalInputs { + /** + * Specifies the externalInputs property: External input values, used by external tooling for parameter + * evaluation.. + * + * @param externalInputs External input values, used by external tooling for parameter evaluation. + * @return the next definition stage. + */ + Update withExternalInputs(Map externalInputs); + } + + /** + * The stage of the DeploymentStack update allowing to specify externalInputDefinitions. + */ + interface WithExternalInputDefinitions { + /** + * Specifies the externalInputDefinitions property: External input definitions, used by external tooling to + * define expected external input values.. + * + * @param externalInputDefinitions External input definitions, used by external tooling to define expected + * external input values. + * @return the next definition stage. + */ + Update + withExternalInputDefinitions(Map externalInputDefinitions); + } + + /** + * The stage of the DeploymentStack update allowing to specify actionOnUnmanage. + */ + interface WithActionOnUnmanage { + /** + * Specifies the actionOnUnmanage property: Defines the behavior of resources that are no longer managed + * after the Deployment stack is updated or deleted.. + * + * @param actionOnUnmanage Defines the behavior of resources that are no longer managed after the Deployment + * stack is updated or deleted. + * @return the next definition stage. + */ + Update withActionOnUnmanage(ActionOnUnmanage actionOnUnmanage); + } + + /** + * The stage of the DeploymentStack update allowing to specify debugSetting. + */ + interface WithDebugSetting { + /** + * Specifies the debugSetting property: The debug setting of the deployment.. + * + * @param debugSetting The debug setting of the deployment. + * @return the next definition stage. + */ + Update withDebugSetting(DeploymentStacksDebugSetting debugSetting); + } + + /** + * The stage of the DeploymentStack update allowing to specify deploymentScope. + */ + interface WithDeploymentScope { + /** + * Specifies the deploymentScope property: The scope at which the initial deployment should be created. If a + * scope is not specified, it will default to the scope of the deployment stack. Valid scopes are: + * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), + * subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').. + * + * @param deploymentScope The scope at which the initial deployment should be created. If a scope is not + * specified, it will default to the scope of the deployment stack. Valid scopes are: management group + * (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + * @return the next definition stage. + */ + Update withDeploymentScope(String deploymentScope); + } + + /** + * The stage of the DeploymentStack update allowing to specify description. + */ + interface WithDescription { + /** + * Specifies the description property: Deployment stack description. Max length of 4096 characters.. + * + * @param description Deployment stack description. Max length of 4096 characters. + * @return the next definition stage. + */ + Update withDescription(String description); + } + + /** + * The stage of the DeploymentStack update allowing to specify denySettings. + */ + interface WithDenySettings { + /** + * Specifies the denySettings property: Defines how resources deployed by the stack are locked.. + * + * @param denySettings Defines how resources deployed by the stack are locked. + * @return the next definition stage. + */ + Update withDenySettings(DenySettings denySettings); + } + + /** + * The stage of the DeploymentStack update allowing to specify validationLevel. + */ + interface WithValidationLevel { + /** + * Specifies the validationLevel property: The validation level of the deployment stack. + * + * @param validationLevel The validation level of the deployment stack. + * @return the next definition stage. + */ + Update withValidationLevel(ValidationLevel validationLevel); + } + + /** + * The stage of the DeploymentStack update allowing to specify bypassStackOutOfSyncError. + */ + interface WithBypassStackOutOfSyncError { + /** + * Specifies the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack + * resource list is not correctly synchronized.. + * + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is + * not correctly synchronized. + * @return the next definition stage. + */ + Update withBypassStackOutOfSyncError(Boolean bypassStackOutOfSyncError); } } @@ -269,47 +899,47 @@ interface WithProperties { DeploymentStack refresh(Context context); /** - * Exports the template used to create the Deployment stack at Resource Group scope. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * - * @param context The context to associate with this operation. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack along with {@link Response}. + * @return the response. */ - Response exportTemplateAtResourceGroupWithResponse(Context context); + DeploymentStackValidateResult validateStackAtResourceGroup(DeploymentStackInner deploymentStack); /** - * Exports the template used to create the Deployment stack at Resource Group scope. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * + * @param deploymentStack The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack. + * @return the response. */ - DeploymentStackTemplateDefinition exportTemplateAtResourceGroup(); + DeploymentStackValidateResult validateStackAtResourceGroup(DeploymentStackInner deploymentStack, Context context); /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param deploymentStack Deployment stack to validate. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return export Template specific properties of the Deployment stack along with {@link Response}. */ - DeploymentStackValidateResult validateStackAtResourceGroup(DeploymentStackInner deploymentStack); + Response exportTemplateAtResourceGroupWithResponse(Context context); /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param deploymentStack Deployment stack to validate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return export Template specific properties of the Deployment stack. */ - DeploymentStackValidateResult validateStackAtResourceGroup(DeploymentStackInner deploymentStack, Context context); + DeploymentStackTemplateDefinition exportTemplateAtResourceGroup(); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProvisioningState.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProvisioningState.java index bd259cd75346..5066e72fb47b 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProvisioningState.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; @@ -12,61 +12,71 @@ */ public final class DeploymentStackProvisioningState extends ExpandableStringEnum { /** - * Static value creating for DeploymentStackProvisioningState. + * The deployment stack is currently being created. */ public static final DeploymentStackProvisioningState CREATING = fromString("creating"); /** - * Static value validating for DeploymentStackProvisioningState. + * The deployment stack is currently being validated. */ public static final DeploymentStackProvisioningState VALIDATING = fromString("validating"); /** - * Static value waiting for DeploymentStackProvisioningState. + * The deployment stack is currently waiting. */ public static final DeploymentStackProvisioningState WAITING = fromString("waiting"); /** - * Static value deploying for DeploymentStackProvisioningState. + * The deployment stack is currently deploying. */ public static final DeploymentStackProvisioningState DEPLOYING = fromString("deploying"); /** - * Static value canceling for DeploymentStackProvisioningState. + * The deployment stack is being cancelled. */ public static final DeploymentStackProvisioningState CANCELING = fromString("canceling"); /** - * Static value updatingDenyAssignments for DeploymentStackProvisioningState. + * The deployment stack is updating deny assignments. */ public static final DeploymentStackProvisioningState UPDATING_DENY_ASSIGNMENTS = fromString("updatingDenyAssignments"); /** - * Static value deletingResources for DeploymentStackProvisioningState. + * The deployment stack is deleting resources. */ public static final DeploymentStackProvisioningState DELETING_RESOURCES = fromString("deletingResources"); /** - * Static value succeeded for DeploymentStackProvisioningState. + * The deployment stack completed successfully. */ public static final DeploymentStackProvisioningState SUCCEEDED = fromString("succeeded"); /** - * Static value failed for DeploymentStackProvisioningState. + * The deployment stack has failed. */ public static final DeploymentStackProvisioningState FAILED = fromString("failed"); /** - * Static value canceled for DeploymentStackProvisioningState. + * The deployment stack has been cancelled. */ public static final DeploymentStackProvisioningState CANCELED = fromString("canceled"); /** - * Static value deleting for DeploymentStackProvisioningState. + * The deployment stack is being deleted. */ public static final DeploymentStackProvisioningState DELETING = fromString("deleting"); + /** + * The deployment stack is currently being initialized. + */ + public static final DeploymentStackProvisioningState INITIALIZING = fromString("initializing"); + + /** + * The deployment stack is currently performing an operation. + */ + public static final DeploymentStackProvisioningState RUNNING = fromString("running"); + /** * Creates a new instance of DeploymentStackProvisioningState value. * diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackTemplateDefinition.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackTemplateDefinition.java index f07627cc11b2..b56716e8de1d 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackTemplateDefinition.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackTemplateDefinition.java @@ -1,10 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackTemplateDefinitionInner; +import java.util.Map; /** * An immutable client-side representation of DeploymentStackTemplateDefinition. @@ -17,7 +19,7 @@ public interface DeploymentStackTemplateDefinition { * * @return the template value. */ - Object template(); + Map template(); /** * Gets the templateLink property: The URI of the template. Use either the templateLink property or the template diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateProperties.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateProperties.java index bed12c04c4c3..2177c85363b3 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateProperties.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The Deployment stack validation result details. */ -@Fluent +@Immutable public final class DeploymentStackValidateProperties implements JsonSerializable { /* * Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted. @@ -58,10 +58,20 @@ public final class DeploymentStackValidateProperties implements JsonSerializable */ private List validatedResources; + /* + * The deployment extensions. + */ + private List deploymentExtensions; + + /* + * The validation level of the deployment stack + */ + private ValidationLevel validationLevel; + /** * Creates an instance of DeploymentStackValidateProperties class. */ - public DeploymentStackValidateProperties() { + private DeploymentStackValidateProperties() { } /** @@ -74,18 +84,6 @@ public ActionOnUnmanage actionOnUnmanage() { return this.actionOnUnmanage; } - /** - * Set the actionOnUnmanage property: Defines the behavior of resources that are no longer managed after the - * Deployment stack is updated or deleted. - * - * @param actionOnUnmanage the actionOnUnmanage value to set. - * @return the DeploymentStackValidateProperties object itself. - */ - public DeploymentStackValidateProperties withActionOnUnmanage(ActionOnUnmanage actionOnUnmanage) { - this.actionOnUnmanage = actionOnUnmanage; - return this; - } - /** * Get the correlationId property: The correlation id of the Deployment stack validate operation. It is in GUID * format and is used for tracing. @@ -96,18 +94,6 @@ public String correlationId() { return this.correlationId; } - /** - * Set the correlationId property: The correlation id of the Deployment stack validate operation. It is in GUID - * format and is used for tracing. - * - * @param correlationId the correlationId value to set. - * @return the DeploymentStackValidateProperties object itself. - */ - public DeploymentStackValidateProperties withCorrelationId(String correlationId) { - this.correlationId = correlationId; - return this; - } - /** * Get the denySettings property: The Deployment stack deny settings. * @@ -117,17 +103,6 @@ public DenySettings denySettings() { return this.denySettings; } - /** - * Set the denySettings property: The Deployment stack deny settings. - * - * @param denySettings the denySettings value to set. - * @return the DeploymentStackValidateProperties object itself. - */ - public DeploymentStackValidateProperties withDenySettings(DenySettings denySettings) { - this.denySettings = denySettings; - return this; - } - /** * Get the deploymentScope property: The Deployment stack deployment scope. * @@ -137,17 +112,6 @@ public String deploymentScope() { return this.deploymentScope; } - /** - * Set the deploymentScope property: The Deployment stack deployment scope. - * - * @param deploymentScope the deploymentScope value to set. - * @return the DeploymentStackValidateProperties object itself. - */ - public DeploymentStackValidateProperties withDeploymentScope(String deploymentScope) { - this.deploymentScope = deploymentScope; - return this; - } - /** * Get the description property: The Deployment stack validation description. * @@ -157,17 +121,6 @@ public String description() { return this.description; } - /** - * Set the description property: The Deployment stack validation description. - * - * @param description the description value to set. - * @return the DeploymentStackValidateProperties object itself. - */ - public DeploymentStackValidateProperties withDescription(String description) { - this.description = description; - return this; - } - /** * Get the parameters property: Deployment parameters. * @@ -177,17 +130,6 @@ public Map parameters() { return this.parameters; } - /** - * Set the parameters property: Deployment parameters. - * - * @param parameters the parameters value to set. - * @return the DeploymentStackValidateProperties object itself. - */ - public DeploymentStackValidateProperties withParameters(Map parameters) { - this.parameters = parameters; - return this; - } - /** * Get the templateLink property: The URI of the template. * @@ -197,17 +139,6 @@ public DeploymentStacksTemplateLink templateLink() { return this.templateLink; } - /** - * Set the templateLink property: The URI of the template. - * - * @param templateLink the templateLink value to set. - * @return the DeploymentStackValidateProperties object itself. - */ - public DeploymentStackValidateProperties withTemplateLink(DeploymentStacksTemplateLink templateLink) { - this.templateLink = templateLink; - return this; - } - /** * Get the validatedResources property: The array of resources that were validated. * @@ -218,41 +149,21 @@ public List validatedResources() { } /** - * Set the validatedResources property: The array of resources that were validated. + * Get the deploymentExtensions property: The deployment extensions. * - * @param validatedResources the validatedResources value to set. - * @return the DeploymentStackValidateProperties object itself. + * @return the deploymentExtensions value. */ - public DeploymentStackValidateProperties withValidatedResources(List validatedResources) { - this.validatedResources = validatedResources; - return this; + public List deploymentExtensions() { + return this.deploymentExtensions; } /** - * Validates the instance. + * Get the validationLevel property: The validation level of the deployment stack. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the validationLevel value. */ - public void validate() { - if (actionOnUnmanage() != null) { - actionOnUnmanage().validate(); - } - if (denySettings() != null) { - denySettings().validate(); - } - if (parameters() != null) { - parameters().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (templateLink() != null) { - templateLink().validate(); - } - if (validatedResources() != null) { - validatedResources().forEach(e -> e.validate()); - } + public ValidationLevel validationLevel() { + return this.validationLevel; } /** @@ -270,6 +181,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("templateLink", this.templateLink); jsonWriter.writeArrayField("validatedResources", this.validatedResources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("deploymentExtensions", this.deploymentExtensions, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("validationLevel", + this.validationLevel == null ? null : this.validationLevel.toString()); return jsonWriter.writeEndObject(); } @@ -310,6 +225,13 @@ public static DeploymentStackValidateProperties fromJson(JsonReader jsonReader) List validatedResources = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); deserializedDeploymentStackValidateProperties.validatedResources = validatedResources; + } else if ("deploymentExtensions".equals(fieldName)) { + List deploymentExtensions + = reader.readArray(reader1 -> DeploymentExtension.fromJson(reader1)); + deserializedDeploymentStackValidateProperties.deploymentExtensions = deploymentExtensions; + } else if ("validationLevel".equals(fieldName)) { + deserializedDeploymentStackValidateProperties.validationLevel + = ValidationLevel.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateResult.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateResult.java index 9d7b0eb7f59e..74e414e4d47d 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateResult.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; @@ -13,21 +13,21 @@ */ public interface DeploymentStackValidateResult { /** - * Gets the id property: Fully qualified resource Id for the resource. + * Gets the id property: String Id used to locate any resource on Azure. * * @return the id value. */ String id(); /** - * Gets the name property: The name of the resource. + * Gets the name property: Name of this resource. * * @return the name value. */ String name(); /** - * Gets the type property: The type of the resource. + * Gets the type property: Type of this resource. * * @return the type value. */ @@ -41,18 +41,18 @@ public interface DeploymentStackValidateResult { SystemData systemData(); /** - * Gets the properties property: The validation result details. + * Gets the error property: The error detail. * - * @return the properties value. + * @return the error value. */ - DeploymentStackValidateProperties properties(); + ManagementError error(); /** - * Gets the error property: The error detail. + * Gets the properties property: The validation result details. * - * @return the error value. + * @return the properties value. */ - ManagementError error(); + DeploymentStackValidateProperties properties(); /** * Gets the inner diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacks.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacks.java index b613c6f927c1..eb6546ab211c 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacks.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; @@ -14,99 +14,87 @@ */ public interface DeploymentStacks { /** - * Lists all the Deployment stacks within the specified Resource Group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all the Deployment stacks within the specified Resource Group. + * Gets the Deployment stack with the given name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Lists all the Deployment stacks within the specified Subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the Deployment stack with the given name along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String deploymentStackName, + Context context); /** - * Lists all the Deployment stacks within the specified Subscription. + * Gets the Deployment stack with the given name. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the Deployment stack with the given name. */ - PagedIterable list(Context context); + DeploymentStack getByResourceGroup(String resourceGroupName, String deploymentStackName); /** - * Lists all the Deployment stacks within the specified Management Group. + * Lists Deployment stacks at the specified scope. * - * @param managementGroupId Management Group id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listAtManagementGroup(String managementGroupId); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Lists all the Deployment stacks within the specified Management Group. + * Lists Deployment stacks at the specified scope. * - * @param managementGroupId Management Group id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Deployment stacks as paginated response with {@link PagedIterable}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listAtManagementGroup(String managementGroupId, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Gets a Deployment stack with a given name at Resource Group scope. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param context The context to associate with this operation. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Resource Group scope along with {@link Response}. + * @return the response. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String deploymentStackName, - Context context); + DeploymentStackValidateResult validateStackAtResourceGroup(String resourceGroupName, String deploymentStackName, + DeploymentStackInner deploymentStack); /** - * Gets a Deployment stack with a given name at Resource Group scope. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Resource Group scope. + * @return the response. */ - DeploymentStack getByResourceGroup(String resourceGroupName, String deploymentStackName); + DeploymentStackValidateResult validateStackAtResourceGroup(String resourceGroupName, String deploymentStackName, + DeploymentStackInner deploymentStack, Context context); /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -118,7 +106,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNam void delete(String resourceGroupName, String deploymentStackName); /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -126,6 +114,8 @@ Response getByResourceGroupWithResponse(String resourceGroupNam * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @param context The context to associate with this operation. @@ -134,167 +124,158 @@ Response getByResourceGroupWithResponse(String resourceGroupNam * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context); + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); /** - * Creates or updates a Deployment stack at Subscription scope. + * Exports the template used to create the Deployment stack at the specified scope. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object. + * @return export Template specific properties of the Deployment stack along with {@link Response}. */ - DeploymentStack createOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack); + Response exportTemplateAtResourceGroupWithResponse(String resourceGroupName, + String deploymentStackName, Context context); /** - * Creates or updates a Deployment stack at Subscription scope. + * Exports the template used to create the Deployment stack at the specified scope. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object. + * @return export Template specific properties of the Deployment stack. */ - DeploymentStack createOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack, - Context context); + DeploymentStackTemplateDefinition exportTemplateAtResourceGroup(String resourceGroupName, + String deploymentStackName); /** - * Gets a Deployment stack with a given name at Subscription scope. + * Gets the Deployment stack with the given name. * * @param deploymentStackName Name of the deployment stack. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Subscription scope along with {@link Response}. + * @return the Deployment stack with the given name along with {@link Response}. */ Response getAtSubscriptionWithResponse(String deploymentStackName, Context context); /** - * Gets a Deployment stack with a given name at Subscription scope. + * Gets the Deployment stack with the given name. * * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Subscription scope. + * @return the Deployment stack with the given name. */ DeploymentStack getAtSubscription(String deploymentStackName); /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Lists Deployment stacks at the specified scope. * - * @param deploymentStackName Name of the deployment stack. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ - void deleteAtSubscription(String deploymentStackName); + PagedIterable list(); /** - * Deletes a Deployment stack by name at Subscription scope. When operation completes, status code 200 returned - * without content. + * Lists Deployment stacks at the specified scope. * - * @param deploymentStackName Name of the deployment stack. - * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. - * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. - * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. - * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not - * correctly synchronized. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ - void deleteAtSubscription(String deploymentStackName, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context); + PagedIterable list(Context context); /** - * Creates or updates a Deployment stack at Management Group scope. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object. + * @return the response. */ - DeploymentStack createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, + DeploymentStackValidateResult validateStackAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack); /** - * Creates or updates a Deployment stack at Management Group scope. + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to + * Azure Resource Manager. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack supplied to the operation. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment stack object. + * @return the response. */ - DeploymentStack createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, + DeploymentStackValidateResult validateStackAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack, Context context); /** - * Gets a Deployment stack with a given name at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. - * @param context The context to associate with this operation. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Management Group scope along with {@link Response}. + * @return deployment stack object. */ - Response getAtManagementGroupWithResponse(String managementGroupId, String deploymentStackName, - Context context); + DeploymentStack createOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack); /** - * Gets a Deployment stack with a given name at Management Group scope. + * Creates or updates a Deployment stack at the specified scope. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. + * @param deploymentStack Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Management Group scope. + * @return deployment stack object. */ - DeploymentStack getAtManagementGroup(String managementGroupId, String deploymentStackName); + DeploymentStack createOrUpdateAtSubscription(String deploymentStackName, DeploymentStackInner deploymentStack, + Context context); /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteAtManagementGroup(String managementGroupId, String deploymentStackName); + void deleteAtSubscription(String deploymentStackName); /** - * Deletes a Deployment stack by name at Management Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * - * @param managementGroupId Management Group id. * @param deploymentStackName Name of the deployment stack. * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @param context The context to associate with this operation. @@ -302,16 +283,15 @@ Response getAtManagementGroupWithResponse(String managementGrou * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteAtManagementGroup(String managementGroupId, String deploymentStackName, - UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context); + void deleteAtSubscription(String deploymentStackName, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); /** - * Exports the template used to create the Deployment stack at Resource Group scope. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -319,189 +299,218 @@ void deleteAtManagementGroup(String managementGroupId, String deploymentStackNam * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return export Template specific properties of the Deployment stack along with {@link Response}. */ - Response exportTemplateAtResourceGroupWithResponse(String resourceGroupName, - String deploymentStackName, Context context); + Response exportTemplateAtSubscriptionWithResponse(String deploymentStackName, + Context context); /** - * Exports the template used to create the Deployment stack at Resource Group scope. + * Exports the template used to create the Deployment stack at the specified scope. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return export Template specific properties of the Deployment stack. */ - DeploymentStackTemplateDefinition exportTemplateAtResourceGroup(String resourceGroupName, - String deploymentStackName); + DeploymentStackTemplateDefinition exportTemplateAtSubscription(String deploymentStackName); /** - * Exports the template used to create the Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack along with {@link Response}. + * @return the Deployment stack with the given name along with {@link Response}. */ - Response exportTemplateAtSubscriptionWithResponse(String deploymentStackName, + Response getAtManagementGroupWithResponse(String managementGroupId, String deploymentStackName, Context context); /** - * Exports the template used to create the Deployment stack at Subscription scope. + * Gets the Deployment stack with the given name. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack. + * @return the Deployment stack with the given name. */ - DeploymentStackTemplateDefinition exportTemplateAtSubscription(String deploymentStackName); + DeploymentStack getAtManagementGroup(String managementGroupId, String deploymentStackName); /** - * Exports the template used to create the Deployment stack at Management Group scope. + * Lists Deployment stacks at the specified scope. * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. - * @param context The context to associate with this operation. + * @param managementGroupId The name of the management group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack along with {@link Response}. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ - Response exportTemplateAtManagementGroupWithResponse(String managementGroupId, - String deploymentStackName, Context context); + PagedIterable listAtManagementGroup(String managementGroupId); /** - * Exports the template used to create the Deployment stack at Management Group scope. + * Lists Deployment stacks at the specified scope. * - * @param managementGroupId Management Group id. - * @param deploymentStackName Name of the deployment stack. + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return export Template specific properties of the Deployment stack. + * @return the response of a DeploymentStack list operation as paginated response with {@link PagedIterable}. */ - DeploymentStackTemplateDefinition exportTemplateAtManagementGroup(String managementGroupId, - String deploymentStackName); + PagedIterable listAtManagementGroup(String managementGroupId, Context context); /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return the response. */ - DeploymentStackValidateResult validateStackAtResourceGroup(String resourceGroupName, String deploymentStackName, + DeploymentStackValidateResult validateStackAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack); /** - * Runs preflight validation on the Resource Group scoped Deployment stack template to verify its acceptance to + * Runs preflight validation on the Deployment stack template at the specified scope to verify its acceptance to * Azure Resource Manager. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return the response. */ - DeploymentStackValidateResult validateStackAtResourceGroup(String resourceGroupName, String deploymentStackName, + DeploymentStackValidateResult validateStackAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context); /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Creates or updates a Deployment stack at the specified scope. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return deployment stack object. */ - DeploymentStackValidateResult validateStackAtSubscription(String deploymentStackName, + DeploymentStack createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack); /** - * Runs preflight validation on the Subscription scoped Deployment stack template to verify its acceptance to Azure - * Resource Manager. + * Creates or updates a Deployment stack at the specified scope. * + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param deploymentStack Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. + * @return deployment stack object. */ - DeploymentStackValidateResult validateStackAtSubscription(String deploymentStackName, + DeploymentStack createOrUpdateAtManagementGroup(String managementGroupId, String deploymentStackName, DeploymentStackInner deploymentStack, Context context); /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. */ - DeploymentStackValidateResult validateStackAtManagementGroup(String managementGroupId, String deploymentStackName, - DeploymentStackInner deploymentStack); + void deleteAtManagementGroup(String managementGroupId, String deploymentStackName); /** - * Runs preflight validation on the Management Group scoped Deployment stack template to verify its acceptance to - * Azure Resource Manager. + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. * - * @param managementGroupId Management Group id. + * @param managementGroupId The name of the management group. The name is case insensitive. * @param deploymentStackName Name of the deployment stack. - * @param deploymentStack Deployment stack to validate. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Deployment stack validation result. */ - DeploymentStackValidateResult validateStackAtManagementGroup(String managementGroupId, String deploymentStackName, - DeploymentStackInner deploymentStack, Context context); + void deleteAtManagementGroup(String managementGroupId, String deploymentStackName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); /** - * Gets a Deployment stack with a given name at Resource Group scope. + * Exports the template used to create the Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return export Template specific properties of the Deployment stack along with {@link Response}. + */ + Response exportTemplateAtManagementGroupWithResponse(String managementGroupId, + String deploymentStackName, Context context); + + /** + * Exports the template used to create the Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStackName Name of the deployment stack. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return export Template specific properties of the Deployment stack. + */ + DeploymentStackTemplateDefinition exportTemplateAtManagementGroup(String managementGroupId, + String deploymentStackName); + + /** + * Gets the Deployment stack with the given name. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Resource Group scope along with {@link Response}. + * @return the Deployment stack with the given name along with {@link Response}. */ DeploymentStack getById(String id); /** - * Gets a Deployment stack with a given name at Resource Group scope. + * Gets the Deployment stack with the given name. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Deployment stack with a given name at Resource Group scope along with {@link Response}. + * @return the Deployment stack with the given name along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param id the resource ID. @@ -512,13 +521,15 @@ DeploymentStackValidateResult validateStackAtManagementGroup(String managementGr void deleteById(String id); /** - * Deletes a Deployment stack by name at Resource Group scope. When operation completes, status code 200 returned + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned * without content. * * @param id the resource ID. * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not * correctly synchronized. * @param context The context to associate with this operation. @@ -526,10 +537,11 @@ DeploymentStackValidateResult validateStackAtManagementGroup(String managementGr * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteByIdWithResponse(String id, UnmanageActionResourceMode unmanageActionResources, - UnmanageActionResourceGroupMode unmanageActionResourceGroups, - UnmanageActionManagementGroupMode unmanageActionManagementGroups, Boolean bypassStackOutOfSyncError, - Context context); + void deleteByIdWithResponse(String id, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); /** * Begins definition for a new DeploymentStack resource. diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBase.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBase.java new file mode 100644 index 000000000000..882f317f414c --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBase.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.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; + +/** + * Base model for properties with the before-and-after property values. + */ +@Immutable +public final class DeploymentStacksChangeBase implements JsonSerializable { + /* + * The predicted value before the deployment is executed. + */ + private String before; + + /* + * The predicted value after the deployment is executed. + */ + private String after; + + /** + * Creates an instance of DeploymentStacksChangeBase class. + */ + private DeploymentStacksChangeBase() { + } + + /** + * Get the before property: The predicted value before the deployment is executed. + * + * @return the before value. + */ + public String before() { + return this.before; + } + + /** + * Get the after property: The predicted value after the deployment is executed. + * + * @return the after value. + */ + public String after() { + return this.after; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("before", this.before); + jsonWriter.writeStringField("after", this.after); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksChangeBase from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksChangeBase 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 DeploymentStacksChangeBase. + */ + public static DeploymentStacksChangeBase fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksChangeBase deserializedDeploymentStacksChangeBase = new DeploymentStacksChangeBase(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("before".equals(fieldName)) { + deserializedDeploymentStacksChangeBase.before = reader.getString(); + } else if ("after".equals(fieldName)) { + deserializedDeploymentStacksChangeBase.after = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksChangeBase; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDenyStatusMode.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDenyStatusMode.java new file mode 100644 index 000000000000..f911b810f33a --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDenyStatusMode.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.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; + +/** + * Base model for properties with the before-and-after property values. + */ +@Immutable +public final class DeploymentStacksChangeBaseDenyStatusMode + implements JsonSerializable { + /* + * The predicted value before the deployment is executed. + */ + private DenyStatusMode before; + + /* + * The predicted value after the deployment is executed. + */ + private DenyStatusMode after; + + /** + * Creates an instance of DeploymentStacksChangeBaseDenyStatusMode class. + */ + private DeploymentStacksChangeBaseDenyStatusMode() { + } + + /** + * Get the before property: The predicted value before the deployment is executed. + * + * @return the before value. + */ + public DenyStatusMode before() { + return this.before; + } + + /** + * Get the after property: The predicted value after the deployment is executed. + * + * @return the after value. + */ + public DenyStatusMode after() { + return this.after; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("before", this.before == null ? null : this.before.toString()); + jsonWriter.writeStringField("after", this.after == null ? null : this.after.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksChangeBaseDenyStatusMode from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksChangeBaseDenyStatusMode 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 DeploymentStacksChangeBaseDenyStatusMode. + */ + public static DeploymentStacksChangeBaseDenyStatusMode fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksChangeBaseDenyStatusMode deserializedDeploymentStacksChangeBaseDenyStatusMode + = new DeploymentStacksChangeBaseDenyStatusMode(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("before".equals(fieldName)) { + deserializedDeploymentStacksChangeBaseDenyStatusMode.before + = DenyStatusMode.fromString(reader.getString()); + } else if ("after".equals(fieldName)) { + deserializedDeploymentStacksChangeBaseDenyStatusMode.after + = DenyStatusMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksChangeBaseDenyStatusMode; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDeploymentStacksManagementStatus.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDeploymentStacksManagementStatus.java new file mode 100644 index 000000000000..00cb60ff8b98 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDeploymentStacksManagementStatus.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.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; + +/** + * Base model for properties with the before-and-after property values. + */ +@Immutable +public final class DeploymentStacksChangeBaseDeploymentStacksManagementStatus + implements JsonSerializable { + /* + * The predicted value before the deployment is executed. + */ + private DeploymentStacksManagementStatus before; + + /* + * The predicted value after the deployment is executed. + */ + private DeploymentStacksManagementStatus after; + + /** + * Creates an instance of DeploymentStacksChangeBaseDeploymentStacksManagementStatus class. + */ + private DeploymentStacksChangeBaseDeploymentStacksManagementStatus() { + } + + /** + * Get the before property: The predicted value before the deployment is executed. + * + * @return the before value. + */ + public DeploymentStacksManagementStatus before() { + return this.before; + } + + /** + * Get the after property: The predicted value after the deployment is executed. + * + * @return the after value. + */ + public DeploymentStacksManagementStatus after() { + return this.after; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("before", this.before == null ? null : this.before.toString()); + jsonWriter.writeStringField("after", this.after == null ? null : this.after.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksChangeBaseDeploymentStacksManagementStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksChangeBaseDeploymentStacksManagementStatus 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 + * DeploymentStacksChangeBaseDeploymentStacksManagementStatus. + */ + public static DeploymentStacksChangeBaseDeploymentStacksManagementStatus fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksChangeBaseDeploymentStacksManagementStatus deserializedDeploymentStacksChangeBaseDeploymentStacksManagementStatus + = new DeploymentStacksChangeBaseDeploymentStacksManagementStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("before".equals(fieldName)) { + deserializedDeploymentStacksChangeBaseDeploymentStacksManagementStatus.before + = DeploymentStacksManagementStatus.fromString(reader.getString()); + } else if ("after".equals(fieldName)) { + deserializedDeploymentStacksChangeBaseDeploymentStacksManagementStatus.after + = DeploymentStacksManagementStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksChangeBaseDeploymentStacksManagementStatus; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaDenySettings.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaDenySettings.java new file mode 100644 index 000000000000..a51570ce0613 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaDenySettings.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.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; +import java.util.List; + +/** + * Model to show the before-and-after property values, along with the delta between them. + */ +@Immutable +public final class DeploymentStacksChangeDeltaDenySettings + implements JsonSerializable { + /* + * The predicted value before the deployment is executed. + */ + private DenySettings before; + + /* + * The predicted value after the deployment is executed. + */ + private DenySettings after; + + /* + * The predicted changes to the properties." + */ + private List delta; + + /** + * Creates an instance of DeploymentStacksChangeDeltaDenySettings class. + */ + private DeploymentStacksChangeDeltaDenySettings() { + } + + /** + * Get the before property: The predicted value before the deployment is executed. + * + * @return the before value. + */ + public DenySettings before() { + return this.before; + } + + /** + * Get the after property: The predicted value after the deployment is executed. + * + * @return the after value. + */ + public DenySettings after() { + return this.after; + } + + /** + * Get the delta property: The predicted changes to the properties.". + * + * @return the delta value. + */ + public List delta() { + return this.delta; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("before", this.before); + jsonWriter.writeJsonField("after", this.after); + jsonWriter.writeArrayField("delta", this.delta, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksChangeDeltaDenySettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksChangeDeltaDenySettings 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 DeploymentStacksChangeDeltaDenySettings. + */ + public static DeploymentStacksChangeDeltaDenySettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksChangeDeltaDenySettings deserializedDeploymentStacksChangeDeltaDenySettings + = new DeploymentStacksChangeDeltaDenySettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("before".equals(fieldName)) { + deserializedDeploymentStacksChangeDeltaDenySettings.before = DenySettings.fromJson(reader); + } else if ("after".equals(fieldName)) { + deserializedDeploymentStacksChangeDeltaDenySettings.after = DenySettings.fromJson(reader); + } else if ("delta".equals(fieldName)) { + List delta + = reader.readArray(reader1 -> DeploymentStacksWhatIfPropertyChange.fromJson(reader1)); + deserializedDeploymentStacksChangeDeltaDenySettings.delta = delta; + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksChangeDeltaDenySettings; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaRecord.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaRecord.java new file mode 100644 index 000000000000..556b0e54a63d --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaRecord.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.BinaryData; +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; +import java.util.Map; + +/** + * Model to show the before-and-after property values, along with the delta between them. + */ +@Immutable +public final class DeploymentStacksChangeDeltaRecord implements JsonSerializable { + /* + * The predicted value before the deployment is executed. + */ + private Map before; + + /* + * The predicted value after the deployment is executed. + */ + private Map after; + + /* + * The predicted changes to the properties." + */ + private List delta; + + /** + * Creates an instance of DeploymentStacksChangeDeltaRecord class. + */ + private DeploymentStacksChangeDeltaRecord() { + } + + /** + * Get the before property: The predicted value before the deployment is executed. + * + * @return the before value. + */ + public Map before() { + return this.before; + } + + /** + * Get the after property: The predicted value after the deployment is executed. + * + * @return the after value. + */ + public Map after() { + return this.after; + } + + /** + * Get the delta property: The predicted changes to the properties.". + * + * @return the delta value. + */ + public List delta() { + return this.delta; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("before", this.before, + (writer, element) -> writer.writeUntyped(element == null ? null : element.toObject(Object.class))); + jsonWriter.writeMapField("after", this.after, + (writer, element) -> writer.writeUntyped(element == null ? null : element.toObject(Object.class))); + jsonWriter.writeArrayField("delta", this.delta, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksChangeDeltaRecord from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksChangeDeltaRecord 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 DeploymentStacksChangeDeltaRecord. + */ + public static DeploymentStacksChangeDeltaRecord fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksChangeDeltaRecord deserializedDeploymentStacksChangeDeltaRecord + = new DeploymentStacksChangeDeltaRecord(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("before".equals(fieldName)) { + Map before = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedDeploymentStacksChangeDeltaRecord.before = before; + } else if ("after".equals(fieldName)) { + Map after = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedDeploymentStacksChangeDeltaRecord.after = after; + } else if ("delta".equals(fieldName)) { + List delta + = reader.readArray(reader1 -> DeploymentStacksWhatIfPropertyChange.fromJson(reader1)); + deserializedDeploymentStacksChangeDeltaRecord.delta = delta; + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksChangeDeltaRecord; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDebugSetting.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDebugSetting.java index adb4261c0a36..b809d72a7459 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDebugSetting.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDebugSetting.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; @@ -59,14 +59,6 @@ public DeploymentStacksDebugSetting withDetailLevel(String detailLevel) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDeleteDetachEnum.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDeleteDetachEnum.java index 9ac3b23c8ce8..40a6a3b6584d 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDeleteDetachEnum.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDeleteDetachEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; @@ -13,12 +13,12 @@ */ public final class DeploymentStacksDeleteDetachEnum extends ExpandableStringEnum { /** - * Static value delete for DeploymentStacksDeleteDetachEnum. + * Delete the specified resources from Azure. */ public static final DeploymentStacksDeleteDetachEnum DELETE = fromString("delete"); /** - * Static value detach for DeploymentStacksDeleteDetachEnum. + * Keep the specified resources in Azure. */ public static final DeploymentStacksDeleteDetachEnum DETACH = fromString("detach"); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnostic.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnostic.java new file mode 100644 index 000000000000..bbc4a0c75caf --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnostic.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.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; +import java.util.List; + +/** + * The error additional info. + */ +@Immutable +public final class DeploymentStacksDiagnostic implements JsonSerializable { + /* + * Denotes the additional response level. + */ + private DeploymentStacksDiagnosticLevel level; + + /* + * The error code. + */ + private String code; + + /* + * The error message. + */ + private String message; + + /* + * The error target. + */ + private String target; + + /* + * Additional error information. + */ + private List additionalInfo; + + /** + * Creates an instance of DeploymentStacksDiagnostic class. + */ + private DeploymentStacksDiagnostic() { + } + + /** + * Get the level property: Denotes the additional response level. + * + * @return the level value. + */ + public DeploymentStacksDiagnosticLevel level() { + return this.level; + } + + /** + * Get the code property: The error code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the message property: The error message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Get the target property: The error target. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Get the additionalInfo property: Additional error information. + * + * @return the additionalInfo value. + */ + public List additionalInfo() { + return this.additionalInfo; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("level", this.level == null ? null : this.level.toString()); + jsonWriter.writeStringField("code", this.code); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeStringField("target", this.target); + jsonWriter.writeArrayField("additionalInfo", this.additionalInfo, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksDiagnostic from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksDiagnostic 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 DeploymentStacksDiagnostic. + */ + public static DeploymentStacksDiagnostic fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksDiagnostic deserializedDeploymentStacksDiagnostic = new DeploymentStacksDiagnostic(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("level".equals(fieldName)) { + deserializedDeploymentStacksDiagnostic.level + = DeploymentStacksDiagnosticLevel.fromString(reader.getString()); + } else if ("code".equals(fieldName)) { + deserializedDeploymentStacksDiagnostic.code = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedDeploymentStacksDiagnostic.message = reader.getString(); + } else if ("target".equals(fieldName)) { + deserializedDeploymentStacksDiagnostic.target = reader.getString(); + } else if ("additionalInfo".equals(fieldName)) { + List additionalInfo + = reader.readArray(reader1 -> ErrorAdditionalInfo.fromJson(reader1)); + deserializedDeploymentStacksDiagnostic.additionalInfo = additionalInfo; + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksDiagnostic; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnosticLevel.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnosticLevel.java new file mode 100644 index 000000000000..acfbe3ed42f6 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnosticLevel.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Denotes the additional response level. + */ +public final class DeploymentStacksDiagnosticLevel extends ExpandableStringEnum { + /** + * Informational message. + */ + public static final DeploymentStacksDiagnosticLevel INFO = fromString("info"); + + /** + * Warning message. + */ + public static final DeploymentStacksDiagnosticLevel WARNING = fromString("warning"); + + /** + * Error message. + */ + public static final DeploymentStacksDiagnosticLevel ERROR = fromString("error"); + + /** + * Creates a new instance of DeploymentStacksDiagnosticLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentStacksDiagnosticLevel() { + } + + /** + * Creates or finds a DeploymentStacksDiagnosticLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentStacksDiagnosticLevel. + */ + public static DeploymentStacksDiagnosticLevel fromString(String name) { + return fromString(name, DeploymentStacksDiagnosticLevel.class); + } + + /** + * Gets known DeploymentStacksDiagnosticLevel values. + * + * @return known DeploymentStacksDiagnosticLevel values. + */ + public static Collection values() { + return values(DeploymentStacksDiagnosticLevel.class); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksManagementStatus.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksManagementStatus.java new file mode 100644 index 000000000000..8d5d3160d054 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksManagementStatus.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The management status of the deployment stack resource. + */ +public final class DeploymentStacksManagementStatus extends ExpandableStringEnum { + /** + * The resource is managed by the deployment stack. + */ + public static final DeploymentStacksManagementStatus MANAGED = fromString("managed"); + + /** + * The resource is not managed by the deployment stack. + */ + public static final DeploymentStacksManagementStatus UNMANAGED = fromString("unmanaged"); + + /** + * The management state of the resource could not be determined. + */ + public static final DeploymentStacksManagementStatus UNKNOWN = fromString("unknown"); + + /** + * Creates a new instance of DeploymentStacksManagementStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentStacksManagementStatus() { + } + + /** + * Creates or finds a DeploymentStacksManagementStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentStacksManagementStatus. + */ + public static DeploymentStacksManagementStatus fromString(String name) { + return fromString(name, DeploymentStacksManagementStatus.class); + } + + /** + * Gets known DeploymentStacksManagementStatus values. + * + * @return known DeploymentStacksManagementStatus values. + */ + public static Collection values() { + return values(DeploymentStacksManagementStatus.class); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksParametersLink.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksParametersLink.java index b9a5f0d297cb..9923e1fc7f8d 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksParametersLink.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksParametersLink.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.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; @@ -73,21 +72,6 @@ public DeploymentStacksParametersLink withContentVersion(String contentVersion) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property uri in model DeploymentStacksParametersLink")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DeploymentStacksParametersLink.class); - /** * {@inheritDoc} */ diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksResourcesWithoutDeleteSupportEnum.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksResourcesWithoutDeleteSupportEnum.java new file mode 100644 index 000000000000..cad088d89f6f --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksResourcesWithoutDeleteSupportEnum.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies an action for resources that do not support deletion. + */ +public final class DeploymentStacksResourcesWithoutDeleteSupportEnum + extends ExpandableStringEnum { + /** + * Detach the specified resources from the deployment stack and continue. + */ + public static final DeploymentStacksResourcesWithoutDeleteSupportEnum DETACH = fromString("detach"); + + /** + * Fail the deployment stack if resources cannot be deleted. + */ + public static final DeploymentStacksResourcesWithoutDeleteSupportEnum FAIL = fromString("fail"); + + /** + * Creates a new instance of DeploymentStacksResourcesWithoutDeleteSupportEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentStacksResourcesWithoutDeleteSupportEnum() { + } + + /** + * Creates or finds a DeploymentStacksResourcesWithoutDeleteSupportEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentStacksResourcesWithoutDeleteSupportEnum. + */ + public static DeploymentStacksResourcesWithoutDeleteSupportEnum fromString(String name) { + return fromString(name, DeploymentStacksResourcesWithoutDeleteSupportEnum.class); + } + + /** + * Gets known DeploymentStacksResourcesWithoutDeleteSupportEnum values. + * + * @return known DeploymentStacksResourcesWithoutDeleteSupportEnum values. + */ + public static Collection values() { + return values(DeploymentStacksResourcesWithoutDeleteSupportEnum.class); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksTemplateLink.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksTemplateLink.java index f08b6f9d36f4..d23ec62151cc 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksTemplateLink.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksTemplateLink.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; @@ -155,14 +155,6 @@ public DeploymentStacksTemplateLink withContentVersion(String contentVersion) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChange.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChange.java new file mode 100644 index 000000000000..ef44543e7d24 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChange.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.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; +import java.util.List; + +/** + * Changes predicted to the deployment stack as a result of the what-if operation. + */ +@Immutable +public final class DeploymentStacksWhatIfChange implements JsonSerializable { + /* + * List of resource changes predicted by What-If operation. + */ + private List resourceChanges; + + /* + * Predicted changes to the deployment stack deny settings. + */ + private DeploymentStacksChangeDeltaDenySettings denySettingsChange; + + /* + * Predicted changes to the deployment scope for the deployment stack. + */ + private DeploymentStacksChangeBase deploymentScopeChange; + + /** + * Creates an instance of DeploymentStacksWhatIfChange class. + */ + private DeploymentStacksWhatIfChange() { + } + + /** + * Get the resourceChanges property: List of resource changes predicted by What-If operation. + * + * @return the resourceChanges value. + */ + public List resourceChanges() { + return this.resourceChanges; + } + + /** + * Get the denySettingsChange property: Predicted changes to the deployment stack deny settings. + * + * @return the denySettingsChange value. + */ + public DeploymentStacksChangeDeltaDenySettings denySettingsChange() { + return this.denySettingsChange; + } + + /** + * Get the deploymentScopeChange property: Predicted changes to the deployment scope for the deployment stack. + * + * @return the deploymentScopeChange value. + */ + public DeploymentStacksChangeBase deploymentScopeChange() { + return this.deploymentScopeChange; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("resourceChanges", this.resourceChanges, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("denySettingsChange", this.denySettingsChange); + jsonWriter.writeJsonField("deploymentScopeChange", this.deploymentScopeChange); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksWhatIfChange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksWhatIfChange 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 DeploymentStacksWhatIfChange. + */ + public static DeploymentStacksWhatIfChange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksWhatIfChange deserializedDeploymentStacksWhatIfChange = new DeploymentStacksWhatIfChange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceChanges".equals(fieldName)) { + List resourceChanges + = reader.readArray(reader1 -> DeploymentStacksWhatIfResourceChange.fromJson(reader1)); + deserializedDeploymentStacksWhatIfChange.resourceChanges = resourceChanges; + } else if ("denySettingsChange".equals(fieldName)) { + deserializedDeploymentStacksWhatIfChange.denySettingsChange + = DeploymentStacksChangeDeltaDenySettings.fromJson(reader); + } else if ("deploymentScopeChange".equals(fieldName)) { + deserializedDeploymentStacksWhatIfChange.deploymentScopeChange + = DeploymentStacksChangeBase.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksWhatIfChange; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeCertainty.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeCertainty.java new file mode 100644 index 000000000000..d0ab6b264453 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeCertainty.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Denotes the confidence level of the predicted change. + */ +public final class DeploymentStacksWhatIfChangeCertainty + extends ExpandableStringEnum { + /** + * The change is definite. + */ + public static final DeploymentStacksWhatIfChangeCertainty DEFINITE = fromString("definite"); + + /** + * The change may or may not happen, based on deployment-time conditions. + */ + public static final DeploymentStacksWhatIfChangeCertainty POTENTIAL = fromString("potential"); + + /** + * Creates a new instance of DeploymentStacksWhatIfChangeCertainty value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentStacksWhatIfChangeCertainty() { + } + + /** + * Creates or finds a DeploymentStacksWhatIfChangeCertainty from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentStacksWhatIfChangeCertainty. + */ + public static DeploymentStacksWhatIfChangeCertainty fromString(String name) { + return fromString(name, DeploymentStacksWhatIfChangeCertainty.class); + } + + /** + * Gets known DeploymentStacksWhatIfChangeCertainty values. + * + * @return known DeploymentStacksWhatIfChangeCertainty values. + */ + public static Collection values() { + return values(DeploymentStacksWhatIfChangeCertainty.class); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeType.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeType.java new file mode 100644 index 000000000000..9d120c3e477b --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeType.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of change that will be made to the resource when the deployment is executed. + */ +public final class DeploymentStacksWhatIfChangeType extends ExpandableStringEnum { + /** + * The resource does not exist in the current state but is present in the desired state. The resource will be + * created when the deployment is executed. + */ + public static final DeploymentStacksWhatIfChangeType CREATE = fromString("create"); + + /** + * The resource exists in the current state and is missing from the desired state. The resource will be deleted from + * Azure after the deployment is executed. + */ + public static final DeploymentStacksWhatIfChangeType DELETE = fromString("delete"); + + /** + * The resource exists in the current state and is missing from the desired state. The resource will be removed from + * the deployment stack, but will remain in Azure, after the deployment is executed. + */ + public static final DeploymentStacksWhatIfChangeType DETACH = fromString("detach"); + + /** + * The resource exists in the current state and the desired state and will be redeployed when the deployment is + * executed. The properties of the resource will change. + */ + public static final DeploymentStacksWhatIfChangeType MODIFY = fromString("modify"); + + /** + * The resource exists in the current state and the desired state and will be redeployed when the deployment is + * executed. The properties of the resource will not change. + */ + public static final DeploymentStacksWhatIfChangeType NO_CHANGE = fromString("noChange"); + + /** + * The resource is not supported by What-If. + */ + public static final DeploymentStacksWhatIfChangeType UNSUPPORTED = fromString("unsupported"); + + /** + * Creates a new instance of DeploymentStacksWhatIfChangeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentStacksWhatIfChangeType() { + } + + /** + * Creates or finds a DeploymentStacksWhatIfChangeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentStacksWhatIfChangeType. + */ + public static DeploymentStacksWhatIfChangeType fromString(String name) { + return fromString(name, DeploymentStacksWhatIfChangeType.class); + } + + /** + * Gets known DeploymentStacksWhatIfChangeType values. + * + * @return known DeploymentStacksWhatIfChangeType values. + */ + public static Collection values() { + return values(DeploymentStacksWhatIfChangeType.class); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChange.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChange.java new file mode 100644 index 000000000000..0fb8b81baf3b --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChange.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.BinaryData; +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 predicted change to the resource property. + */ +@Immutable +public final class DeploymentStacksWhatIfPropertyChange + implements JsonSerializable { + /* + * The predicted value before the deployment is executed. + */ + private BinaryData before; + + /* + * The predicted value after the deployment is executed. + */ + private BinaryData after; + + /* + * Type of change that will be made to the resource when the deployment is executed. + */ + private String path; + + /* + * Type of change that will be made to the resource when the deployment is executed. + */ + private DeploymentStacksWhatIfPropertyChangeType changeType; + + /* + * Nested property changes. + */ + private List children; + + /** + * Creates an instance of DeploymentStacksWhatIfPropertyChange class. + */ + private DeploymentStacksWhatIfPropertyChange() { + } + + /** + * Get the before property: The predicted value before the deployment is executed. + * + * @return the before value. + */ + public BinaryData before() { + return this.before; + } + + /** + * Get the after property: The predicted value after the deployment is executed. + * + * @return the after value. + */ + public BinaryData after() { + return this.after; + } + + /** + * Get the path property: Type of change that will be made to the resource when the deployment is executed. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Get the changeType property: Type of change that will be made to the resource when the deployment is executed. + * + * @return the changeType value. + */ + public DeploymentStacksWhatIfPropertyChangeType changeType() { + return this.changeType; + } + + /** + * Get the children property: Nested property changes. + * + * @return the children value. + */ + public List children() { + return this.children; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("path", this.path); + jsonWriter.writeStringField("changeType", this.changeType == null ? null : this.changeType.toString()); + if (this.before != null) { + jsonWriter.writeFieldName("before"); + this.before.writeTo(jsonWriter); + } + if (this.after != null) { + jsonWriter.writeFieldName("after"); + this.after.writeTo(jsonWriter); + } + jsonWriter.writeArrayField("children", this.children, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksWhatIfPropertyChange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksWhatIfPropertyChange 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 DeploymentStacksWhatIfPropertyChange. + */ + public static DeploymentStacksWhatIfPropertyChange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksWhatIfPropertyChange deserializedDeploymentStacksWhatIfPropertyChange + = new DeploymentStacksWhatIfPropertyChange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("path".equals(fieldName)) { + deserializedDeploymentStacksWhatIfPropertyChange.path = reader.getString(); + } else if ("changeType".equals(fieldName)) { + deserializedDeploymentStacksWhatIfPropertyChange.changeType + = DeploymentStacksWhatIfPropertyChangeType.fromString(reader.getString()); + } else if ("before".equals(fieldName)) { + deserializedDeploymentStacksWhatIfPropertyChange.before + = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + } else if ("after".equals(fieldName)) { + deserializedDeploymentStacksWhatIfPropertyChange.after + = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + } else if ("children".equals(fieldName)) { + List children + = reader.readArray(reader1 -> DeploymentStacksWhatIfPropertyChange.fromJson(reader1)); + deserializedDeploymentStacksWhatIfPropertyChange.children = children; + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksWhatIfPropertyChange; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChangeType.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChangeType.java new file mode 100644 index 000000000000..224e46596bd2 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChangeType.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of property change. + */ +public final class DeploymentStacksWhatIfPropertyChangeType + extends ExpandableStringEnum { + /** + * The property is an array and contains nested changes. + */ + public static final DeploymentStacksWhatIfPropertyChangeType ARRAY = fromString("array"); + + /** + * The property does not exist in the current state but is present in the desired state. The property will be + * created when the deployment is executed. + */ + public static final DeploymentStacksWhatIfPropertyChangeType CREATE = fromString("create"); + + /** + * The property exists in the current state and is missing from the desired state. It will be deleted when the + * deployment is executed. + */ + public static final DeploymentStacksWhatIfPropertyChangeType DELETE = fromString("delete"); + + /** + * The property exists in both current and desired state and is different. The value of the property will change + * when the deployment is executed. + */ + public static final DeploymentStacksWhatIfPropertyChangeType MODIFY = fromString("modify"); + + /** + * The property will not be set or updated. + */ + public static final DeploymentStacksWhatIfPropertyChangeType NO_EFFECT = fromString("noEffect"); + + /** + * Creates a new instance of DeploymentStacksWhatIfPropertyChangeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentStacksWhatIfPropertyChangeType() { + } + + /** + * Creates or finds a DeploymentStacksWhatIfPropertyChangeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentStacksWhatIfPropertyChangeType. + */ + public static DeploymentStacksWhatIfPropertyChangeType fromString(String name) { + return fromString(name, DeploymentStacksWhatIfPropertyChangeType.class); + } + + /** + * Gets known DeploymentStacksWhatIfPropertyChangeType values. + * + * @return known DeploymentStacksWhatIfPropertyChangeType values. + */ + public static Collection values() { + return values(DeploymentStacksWhatIfPropertyChangeType.class); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResourceChange.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResourceChange.java new file mode 100644 index 000000000000..4d339e38d1b0 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResourceChange.java @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.BinaryData; +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; + +/** + * Information about a single resource change predicted by What-If operation. + */ +@Immutable +public final class DeploymentStacksWhatIfResourceChange + implements JsonSerializable { + /* + * The ARM Resource ID of a resource managed by the deployment stack. + */ + private String id; + + /* + * The extension the resource was deployed with. + */ + private DeploymentExtension extension; + + /* + * The resource type. + */ + private String type; + + /* + * The extensible resource identifiers. + */ + private Map identifiers; + + /* + * The API version the resource was deployed with + */ + private String apiVersion; + + /* + * The resource id of the Deployment responsible for this change. + */ + private String deploymentId; + + /* + * The symbolic name of the resource being changed. + */ + private String symbolicName; + + /* + * Type of change that will be made to the resource when the deployment is executed. + */ + private DeploymentStacksWhatIfChangeType changeType; + + /* + * The confidence level of the predicted change. + */ + private DeploymentStacksWhatIfChangeCertainty changeCertainty; + + /* + * The predicted changes to the deployment stack management status of the resource. + */ + private DeploymentStacksChangeBaseDeploymentStacksManagementStatus managementStatusChange; + + /* + * The predicted changes to the deployment stack deny status of the resource. + */ + private DeploymentStacksChangeBaseDenyStatusMode denyStatusChange; + + /* + * The explanation about why the resource is unsupported by What-If. + */ + private String unsupportedReason; + + /* + * The predicted changes to the resource configuration. + */ + private DeploymentStacksChangeDeltaRecord resourceConfigurationChanges; + + /** + * Creates an instance of DeploymentStacksWhatIfResourceChange class. + */ + private DeploymentStacksWhatIfResourceChange() { + } + + /** + * Get the id property: The ARM Resource ID of a resource managed by the deployment stack. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the extension property: The extension the resource was deployed with. + * + * @return the extension value. + */ + public DeploymentExtension extension() { + return this.extension; + } + + /** + * Get the type property: The resource type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the identifiers property: The extensible resource identifiers. + * + * @return the identifiers value. + */ + public Map identifiers() { + return this.identifiers; + } + + /** + * Get the apiVersion property: The API version the resource was deployed with. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** + * Get the deploymentId property: The resource id of the Deployment responsible for this change. + * + * @return the deploymentId value. + */ + public String deploymentId() { + return this.deploymentId; + } + + /** + * Get the symbolicName property: The symbolic name of the resource being changed. + * + * @return the symbolicName value. + */ + public String symbolicName() { + return this.symbolicName; + } + + /** + * Get the changeType property: Type of change that will be made to the resource when the deployment is executed. + * + * @return the changeType value. + */ + public DeploymentStacksWhatIfChangeType changeType() { + return this.changeType; + } + + /** + * Get the changeCertainty property: The confidence level of the predicted change. + * + * @return the changeCertainty value. + */ + public DeploymentStacksWhatIfChangeCertainty changeCertainty() { + return this.changeCertainty; + } + + /** + * Get the managementStatusChange property: The predicted changes to the deployment stack management status of the + * resource. + * + * @return the managementStatusChange value. + */ + public DeploymentStacksChangeBaseDeploymentStacksManagementStatus managementStatusChange() { + return this.managementStatusChange; + } + + /** + * Get the denyStatusChange property: The predicted changes to the deployment stack deny status of the resource. + * + * @return the denyStatusChange value. + */ + public DeploymentStacksChangeBaseDenyStatusMode denyStatusChange() { + return this.denyStatusChange; + } + + /** + * Get the unsupportedReason property: The explanation about why the resource is unsupported by What-If. + * + * @return the unsupportedReason value. + */ + public String unsupportedReason() { + return this.unsupportedReason; + } + + /** + * Get the resourceConfigurationChanges property: The predicted changes to the resource configuration. + * + * @return the resourceConfigurationChanges value. + */ + public DeploymentStacksChangeDeltaRecord resourceConfigurationChanges() { + return this.resourceConfigurationChanges; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("changeType", this.changeType == null ? null : this.changeType.toString()); + jsonWriter.writeStringField("changeCertainty", + this.changeCertainty == null ? null : this.changeCertainty.toString()); + jsonWriter.writeStringField("deploymentId", this.deploymentId); + jsonWriter.writeStringField("symbolicName", this.symbolicName); + jsonWriter.writeJsonField("managementStatusChange", this.managementStatusChange); + jsonWriter.writeJsonField("denyStatusChange", this.denyStatusChange); + jsonWriter.writeStringField("unsupportedReason", this.unsupportedReason); + jsonWriter.writeJsonField("resourceConfigurationChanges", this.resourceConfigurationChanges); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksWhatIfResourceChange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksWhatIfResourceChange 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 DeploymentStacksWhatIfResourceChange. + */ + public static DeploymentStacksWhatIfResourceChange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksWhatIfResourceChange deserializedDeploymentStacksWhatIfResourceChange + = new DeploymentStacksWhatIfResourceChange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("changeType".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResourceChange.changeType + = DeploymentStacksWhatIfChangeType.fromString(reader.getString()); + } else if ("changeCertainty".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResourceChange.changeCertainty + = DeploymentStacksWhatIfChangeCertainty.fromString(reader.getString()); + } else if ("id".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResourceChange.id = reader.getString(); + } else if ("extension".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResourceChange.extension = DeploymentExtension.fromJson(reader); + } else if ("type".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResourceChange.type = reader.getString(); + } else if ("identifiers".equals(fieldName)) { + Map identifiers = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedDeploymentStacksWhatIfResourceChange.identifiers = identifiers; + } else if ("apiVersion".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResourceChange.apiVersion = reader.getString(); + } else if ("deploymentId".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResourceChange.deploymentId = reader.getString(); + } else if ("symbolicName".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResourceChange.symbolicName = reader.getString(); + } else if ("managementStatusChange".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResourceChange.managementStatusChange + = DeploymentStacksChangeBaseDeploymentStacksManagementStatus.fromJson(reader); + } else if ("denyStatusChange".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResourceChange.denyStatusChange + = DeploymentStacksChangeBaseDenyStatusMode.fromJson(reader); + } else if ("unsupportedReason".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResourceChange.unsupportedReason = reader.getString(); + } else if ("resourceConfigurationChanges".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResourceChange.resourceConfigurationChanges + = DeploymentStacksChangeDeltaRecord.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksWhatIfResourceChange; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResult.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResult.java new file mode 100644 index 000000000000..3ebcee5b3ea8 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResult.java @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import java.util.Map; + +/** + * An immutable client-side representation of DeploymentStacksWhatIfResult. + */ +public interface DeploymentStacksWhatIfResult { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + DeploymentStacksWhatIfResultProperties properties(); + + /** + * Gets the location property: The geo-location where the resource lives. Required for subscription and management + * group scoped stacks. The location is inherited from the resource group for resource group scoped stacks. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner object. + * + * @return the inner object. + */ + DeploymentStacksWhatIfResultInner innerModel(); + + /** + * The entirety of the DeploymentStacksWhatIfResult definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The DeploymentStacksWhatIfResult definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the DeploymentStacksWhatIfResult definition. + */ + interface Blank extends WithResourceGroup { + } + + /** + * The stage of the DeploymentStacksWhatIfResult definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the DeploymentStacksWhatIfResult definition which contains all the minimum required properties + * for the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + DeploymentStacksWhatIfResult create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DeploymentStacksWhatIfResult create(Context context); + } + + /** + * The stage of the DeploymentStacksWhatIfResult definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. Required for subscription and management group + * scoped stacks. The location is inherited from the resource group for resource group scoped stacks. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. Required for subscription and management group + * scoped stacks. The location is inherited from the resource group for resource group scoped stacks. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + + /** + * The stage of the DeploymentStacksWhatIfResult definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the DeploymentStacksWhatIfResult definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(DeploymentStacksWhatIfResultProperties properties); + } + } + + /** + * Begins update for the DeploymentStacksWhatIfResult resource. + * + * @return the stage of resource update. + */ + DeploymentStacksWhatIfResult.Update update(); + + /** + * The template for DeploymentStacksWhatIfResult update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DeploymentStacksWhatIfResult apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DeploymentStacksWhatIfResult apply(Context context); + } + + /** + * The DeploymentStacksWhatIfResult update stages. + */ + interface UpdateStages { + /** + * The stage of the DeploymentStacksWhatIfResult update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the DeploymentStacksWhatIfResult update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(DeploymentStacksWhatIfResultProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DeploymentStacksWhatIfResult refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DeploymentStacksWhatIfResult refresh(Context context); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DeploymentStacksWhatIfResult whatIf(); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DeploymentStacksWhatIfResult whatIf(Context context); +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultProperties.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultProperties.java new file mode 100644 index 000000000000..4b143751c507 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultProperties.java @@ -0,0 +1,666 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.BinaryData; +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.Duration; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** + * DeploymentStack WhatIfResult Properties. + */ +@Fluent +public final class DeploymentStacksWhatIfResultProperties + implements JsonSerializable { + /* + * The error detail. + */ + private ManagementError error; + + /* + * The template content. You use this element when you want to pass the template syntax directly in the request + * rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the + * templateLink property or the template property, but not both. + */ + private Map template; + + /* + * The URI of the template. Use either the templateLink property or the template property, but not both. + */ + private DeploymentStacksTemplateLink templateLink; + + /* + * Name and value pairs that define the deployment parameters for the template. Use this element when providing the + * parameter values directly in the request, rather than linking to an existing parameter file. Use either the + * parametersLink property or the parameters property, but not both. + */ + private Map parameters; + + /* + * The URI of parameters file. Use this element to link to an existing parameters file. Use either the + * parametersLink property or the parameters property, but not both. + */ + private DeploymentStacksParametersLink parametersLink; + + /* + * The deployment extension configs. Keys of this object are extension aliases as defined in the deployment + * template. + */ + private Map extensionConfigs; + + /* + * External input values, used by external tooling for parameter evaluation. + */ + private Map externalInputs; + + /* + * External input definitions, used by external tooling to define expected external input values. + */ + private Map externalInputDefinitions; + + /* + * Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted. + */ + private ActionOnUnmanage actionOnUnmanage; + + /* + * The debug setting of the deployment. + */ + private DeploymentStacksDebugSetting debugSetting; + + /* + * The scope at which the initial deployment should be created. If a scope is not specified, it will default to the + * scope of the deployment stack. Valid scopes are: management group (format: + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + */ + private String deploymentScope; + + /* + * Deployment stack description. Max length of 4096 characters. + */ + private String description; + + /* + * Defines how resources deployed by the stack are locked. + */ + private DenySettings denySettings; + + /* + * State of the deployment stack. + */ + private DeploymentStackProvisioningState provisioningState; + + /* + * The correlation id of the last Deployment stack upsert or delete operation. It is in GUID format and is used for + * tracing. + */ + private String correlationId; + + /* + * The validation level of the deployment stack + */ + private ValidationLevel validationLevel; + + /* + * The deployment stack id to use as the basis for comparison. + */ + private String deploymentStackResourceId; + + /* + * The timestamp for when the deployment stack was last modified. This can be used to determine if the what-if data + * is still current. + */ + private OffsetDateTime deploymentStackLastModified; + + /* + * The interval to persist the deployment stack what-if result in ISO 8601 format. + */ + private Duration retentionInterval; + + /* + * All of the changes predicted by the deployment stack what-if operation. + */ + private DeploymentStacksWhatIfChange changes; + + /* + * List of resource diagnostics detected by What-If operation. + */ + private List diagnostics; + + /** + * Creates an instance of DeploymentStacksWhatIfResultProperties class. + */ + public DeploymentStacksWhatIfResultProperties() { + } + + /** + * Get the error property: The error detail. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Set the error property: The error detail. + * + * @param error the error value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties withError(ManagementError error) { + this.error = error; + return this; + } + + /** + * Get the template property: The template content. You use this element when you want to pass the template syntax + * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. + * Use either the templateLink property or the template property, but not both. + * + * @return the template value. + */ + public Map template() { + return this.template; + } + + /** + * Set the template property: The template content. You use this element when you want to pass the template syntax + * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. + * Use either the templateLink property or the template property, but not both. + * + * @param template the template value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties withTemplate(Map template) { + this.template = template; + return this; + } + + /** + * Get the templateLink property: The URI of the template. Use either the templateLink property or the template + * property, but not both. + * + * @return the templateLink value. + */ + public DeploymentStacksTemplateLink templateLink() { + return this.templateLink; + } + + /** + * Set the templateLink property: The URI of the template. Use either the templateLink property or the template + * property, but not both. + * + * @param templateLink the templateLink value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties withTemplateLink(DeploymentStacksTemplateLink templateLink) { + this.templateLink = templateLink; + return this; + } + + /** + * Get the parameters property: Name and value pairs that define the deployment parameters for the template. Use + * this element when providing the parameter values directly in the request, rather than linking to an existing + * parameter file. Use either the parametersLink property or the parameters property, but not both. + * + * @return the parameters value. + */ + public Map parameters() { + return this.parameters; + } + + /** + * Set the parameters property: Name and value pairs that define the deployment parameters for the template. Use + * this element when providing the parameter values directly in the request, rather than linking to an existing + * parameter file. Use either the parametersLink property or the parameters property, but not both. + * + * @param parameters the parameters value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties withParameters(Map parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the parametersLink property: The URI of parameters file. Use this element to link to an existing parameters + * file. Use either the parametersLink property or the parameters property, but not both. + * + * @return the parametersLink value. + */ + public DeploymentStacksParametersLink parametersLink() { + return this.parametersLink; + } + + /** + * Set the parametersLink property: The URI of parameters file. Use this element to link to an existing parameters + * file. Use either the parametersLink property or the parameters property, but not both. + * + * @param parametersLink the parametersLink value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties withParametersLink(DeploymentStacksParametersLink parametersLink) { + this.parametersLink = parametersLink; + return this; + } + + /** + * Get the extensionConfigs property: The deployment extension configs. Keys of this object are extension aliases as + * defined in the deployment template. + * + * @return the extensionConfigs value. + */ + public Map extensionConfigs() { + return this.extensionConfigs; + } + + /** + * Set the extensionConfigs property: The deployment extension configs. Keys of this object are extension aliases as + * defined in the deployment template. + * + * @param extensionConfigs the extensionConfigs value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties + withExtensionConfigs(Map extensionConfigs) { + this.extensionConfigs = extensionConfigs; + return this; + } + + /** + * Get the externalInputs property: External input values, used by external tooling for parameter evaluation. + * + * @return the externalInputs value. + */ + public Map externalInputs() { + return this.externalInputs; + } + + /** + * Set the externalInputs property: External input values, used by external tooling for parameter evaluation. + * + * @param externalInputs the externalInputs value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties + withExternalInputs(Map externalInputs) { + this.externalInputs = externalInputs; + return this; + } + + /** + * Get the externalInputDefinitions property: External input definitions, used by external tooling to define + * expected external input values. + * + * @return the externalInputDefinitions value. + */ + public Map externalInputDefinitions() { + return this.externalInputDefinitions; + } + + /** + * Set the externalInputDefinitions property: External input definitions, used by external tooling to define + * expected external input values. + * + * @param externalInputDefinitions the externalInputDefinitions value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties + withExternalInputDefinitions(Map externalInputDefinitions) { + this.externalInputDefinitions = externalInputDefinitions; + return this; + } + + /** + * Get the actionOnUnmanage property: Defines the behavior of resources that are no longer managed after the + * Deployment stack is updated or deleted. + * + * @return the actionOnUnmanage value. + */ + public ActionOnUnmanage actionOnUnmanage() { + return this.actionOnUnmanage; + } + + /** + * Set the actionOnUnmanage property: Defines the behavior of resources that are no longer managed after the + * Deployment stack is updated or deleted. + * + * @param actionOnUnmanage the actionOnUnmanage value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties withActionOnUnmanage(ActionOnUnmanage actionOnUnmanage) { + this.actionOnUnmanage = actionOnUnmanage; + return this; + } + + /** + * Get the debugSetting property: The debug setting of the deployment. + * + * @return the debugSetting value. + */ + public DeploymentStacksDebugSetting debugSetting() { + return this.debugSetting; + } + + /** + * Set the debugSetting property: The debug setting of the deployment. + * + * @param debugSetting the debugSetting value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties withDebugSetting(DeploymentStacksDebugSetting debugSetting) { + this.debugSetting = debugSetting; + return this; + } + + /** + * Get the deploymentScope property: The scope at which the initial deployment should be created. If a scope is not + * specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + * + * @return the deploymentScope value. + */ + public String deploymentScope() { + return this.deploymentScope; + } + + /** + * Set the deploymentScope property: The scope at which the initial deployment should be created. If a scope is not + * specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + * + * @param deploymentScope the deploymentScope value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties withDeploymentScope(String deploymentScope) { + this.deploymentScope = deploymentScope; + return this; + } + + /** + * Get the description property: Deployment stack description. Max length of 4096 characters. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Deployment stack description. Max length of 4096 characters. + * + * @param description the description value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the denySettings property: Defines how resources deployed by the stack are locked. + * + * @return the denySettings value. + */ + public DenySettings denySettings() { + return this.denySettings; + } + + /** + * Set the denySettings property: Defines how resources deployed by the stack are locked. + * + * @param denySettings the denySettings value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties withDenySettings(DenySettings denySettings) { + this.denySettings = denySettings; + return this; + } + + /** + * Get the provisioningState property: State of the deployment stack. + * + * @return the provisioningState value. + */ + public DeploymentStackProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the correlationId property: The correlation id of the last Deployment stack upsert or delete operation. It is + * in GUID format and is used for tracing. + * + * @return the correlationId value. + */ + public String correlationId() { + return this.correlationId; + } + + /** + * Get the validationLevel property: The validation level of the deployment stack. + * + * @return the validationLevel value. + */ + public ValidationLevel validationLevel() { + return this.validationLevel; + } + + /** + * Set the validationLevel property: The validation level of the deployment stack. + * + * @param validationLevel the validationLevel value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties withValidationLevel(ValidationLevel validationLevel) { + this.validationLevel = validationLevel; + return this; + } + + /** + * Get the deploymentStackResourceId property: The deployment stack id to use as the basis for comparison. + * + * @return the deploymentStackResourceId value. + */ + public String deploymentStackResourceId() { + return this.deploymentStackResourceId; + } + + /** + * Set the deploymentStackResourceId property: The deployment stack id to use as the basis for comparison. + * + * @param deploymentStackResourceId the deploymentStackResourceId value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties withDeploymentStackResourceId(String deploymentStackResourceId) { + this.deploymentStackResourceId = deploymentStackResourceId; + return this; + } + + /** + * Get the deploymentStackLastModified property: The timestamp for when the deployment stack was last modified. This + * can be used to determine if the what-if data is still current. + * + * @return the deploymentStackLastModified value. + */ + public OffsetDateTime deploymentStackLastModified() { + return this.deploymentStackLastModified; + } + + /** + * Get the retentionInterval property: The interval to persist the deployment stack what-if result in ISO 8601 + * format. + * + * @return the retentionInterval value. + */ + public Duration retentionInterval() { + return this.retentionInterval; + } + + /** + * Set the retentionInterval property: The interval to persist the deployment stack what-if result in ISO 8601 + * format. + * + * @param retentionInterval the retentionInterval value to set. + * @return the DeploymentStacksWhatIfResultProperties object itself. + */ + public DeploymentStacksWhatIfResultProperties withRetentionInterval(Duration retentionInterval) { + this.retentionInterval = retentionInterval; + return this; + } + + /** + * Get the changes property: All of the changes predicted by the deployment stack what-if operation. + * + * @return the changes value. + */ + public DeploymentStacksWhatIfChange changes() { + return this.changes; + } + + /** + * Get the diagnostics property: List of resource diagnostics detected by What-If operation. + * + * @return the diagnostics value. + */ + public List diagnostics() { + return this.diagnostics; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("actionOnUnmanage", this.actionOnUnmanage); + jsonWriter.writeJsonField("denySettings", this.denySettings); + jsonWriter.writeStringField("deploymentStackResourceId", this.deploymentStackResourceId); + jsonWriter.writeStringField("retentionInterval", CoreUtils.durationToStringWithDays(this.retentionInterval)); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeMapField("template", this.template, + (writer, element) -> writer.writeUntyped(element == null ? null : element.toObject(Object.class))); + jsonWriter.writeJsonField("templateLink", this.templateLink); + jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("parametersLink", this.parametersLink); + jsonWriter.writeMapField("extensionConfigs", this.extensionConfigs, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeMapField("externalInputs", this.externalInputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeMapField("externalInputDefinitions", this.externalInputDefinitions, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("debugSetting", this.debugSetting); + jsonWriter.writeStringField("deploymentScope", this.deploymentScope); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("validationLevel", + this.validationLevel == null ? null : this.validationLevel.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStacksWhatIfResultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStacksWhatIfResultProperties 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 DeploymentStacksWhatIfResultProperties. + */ + public static DeploymentStacksWhatIfResultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStacksWhatIfResultProperties deserializedDeploymentStacksWhatIfResultProperties + = new DeploymentStacksWhatIfResultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actionOnUnmanage".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.actionOnUnmanage + = ActionOnUnmanage.fromJson(reader); + } else if ("denySettings".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.denySettings = DenySettings.fromJson(reader); + } else if ("deploymentStackResourceId".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.deploymentStackResourceId = reader.getString(); + } else if ("retentionInterval".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.retentionInterval + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else if ("error".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.error = ManagementError.fromJson(reader); + } else if ("template".equals(fieldName)) { + Map template = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedDeploymentStacksWhatIfResultProperties.template = template; + } else if ("templateLink".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.templateLink + = DeploymentStacksTemplateLink.fromJson(reader); + } else if ("parameters".equals(fieldName)) { + Map parameters + = reader.readMap(reader1 -> DeploymentParameter.fromJson(reader1)); + deserializedDeploymentStacksWhatIfResultProperties.parameters = parameters; + } else if ("parametersLink".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.parametersLink + = DeploymentStacksParametersLink.fromJson(reader); + } else if ("extensionConfigs".equals(fieldName)) { + Map extensionConfigs + = reader.readMap(reader1 -> DeploymentExtensionConfig.fromJson(reader1)); + deserializedDeploymentStacksWhatIfResultProperties.extensionConfigs = extensionConfigs; + } else if ("externalInputs".equals(fieldName)) { + Map externalInputs + = reader.readMap(reader1 -> DeploymentExternalInput.fromJson(reader1)); + deserializedDeploymentStacksWhatIfResultProperties.externalInputs = externalInputs; + } else if ("externalInputDefinitions".equals(fieldName)) { + Map externalInputDefinitions + = reader.readMap(reader1 -> DeploymentExternalInputDefinition.fromJson(reader1)); + deserializedDeploymentStacksWhatIfResultProperties.externalInputDefinitions + = externalInputDefinitions; + } else if ("debugSetting".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.debugSetting + = DeploymentStacksDebugSetting.fromJson(reader); + } else if ("deploymentScope".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.deploymentScope = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.description = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.provisioningState + = DeploymentStackProvisioningState.fromString(reader.getString()); + } else if ("correlationId".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.correlationId = reader.getString(); + } else if ("validationLevel".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.validationLevel + = ValidationLevel.fromString(reader.getString()); + } else if ("deploymentStackLastModified".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.deploymentStackLastModified = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("changes".equals(fieldName)) { + deserializedDeploymentStacksWhatIfResultProperties.changes + = DeploymentStacksWhatIfChange.fromJson(reader); + } else if ("diagnostics".equals(fieldName)) { + List diagnostics + = reader.readArray(reader1 -> DeploymentStacksDiagnostic.fromJson(reader1)); + deserializedDeploymentStacksWhatIfResultProperties.diagnostics = diagnostics; + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStacksWhatIfResultProperties; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtManagementGroups.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtManagementGroups.java new file mode 100644 index 000000000000..51fb12789f3f --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtManagementGroups.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; + +/** + * Resource collection API of DeploymentStacksWhatIfResultsAtManagementGroups. + */ +public interface DeploymentStacksWhatIfResultsAtManagementGroups { + /** + * Gets the Deployment stack with the given name. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response}. + */ + Response getWithResponse(String managementGroupId, + String deploymentStacksWhatIfResultName, Context context); + + /** + * Gets the Deployment stack with the given name. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name. + */ + DeploymentStacksWhatIfResult get(String managementGroupId, String deploymentStacksWhatIfResultName); + + /** + * Lists Deployment stacks at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String managementGroupId); + + /** + * Lists Deployment stacks at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String managementGroupId, Context context); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + DeploymentStacksWhatIfResult createOrUpdate(String managementGroupId, String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + DeploymentStacksWhatIfResult createOrUpdate(String managementGroupId, String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource, Context context); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + Response deleteWithResponse(String managementGroupId, String deploymentStacksWhatIfResultName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String managementGroupId, String deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DeploymentStacksWhatIfResult whatIf(String managementGroupId, String deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param managementGroupId The name of the management group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DeploymentStacksWhatIfResult whatIf(String managementGroupId, String deploymentStacksWhatIfResultName, + Context context); +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtResourceGroups.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtResourceGroups.java new file mode 100644 index 000000000000..81caf1d474ff --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtResourceGroups.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DeploymentStacksWhatIfResultsAtResourceGroups. + */ +public interface DeploymentStacksWhatIfResultsAtResourceGroups { + /** + * Gets the Deployment stack with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, + String deploymentStacksWhatIfResultName, Context context); + + /** + * Gets the Deployment stack with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name. + */ + DeploymentStacksWhatIfResult getByResourceGroup(String resourceGroupName, String deploymentStacksWhatIfResultName); + + /** + * Lists Deployment stacks at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists Deployment stacks at the specified scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + Response deleteWithResponse(String resourceGroupName, String deploymentStacksWhatIfResultName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DeploymentStacksWhatIfResult whatIf(String resourceGroupName, String deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DeploymentStacksWhatIfResult whatIf(String resourceGroupName, String deploymentStacksWhatIfResultName, + Context context); + + /** + * Gets the Deployment stack with the given name. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response}. + */ + DeploymentStacksWhatIfResult getById(String id); + + /** + * Gets the Deployment stack with the given name. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param id the resource ID. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + Response deleteByIdWithResponse(String id, DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); + + /** + * Begins definition for a new DeploymentStacksWhatIfResult resource. + * + * @param name resource name. + * @return the first stage of the new DeploymentStacksWhatIfResult definition. + */ + DeploymentStacksWhatIfResult.DefinitionStages.Blank define(String name); +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtSubscriptions.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtSubscriptions.java new file mode 100644 index 000000000000..d939af31f06b --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtSubscriptions.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; + +/** + * Resource collection API of DeploymentStacksWhatIfResultsAtSubscriptions. + */ +public interface DeploymentStacksWhatIfResultsAtSubscriptions { + /** + * Gets the Deployment stack with the given name. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name along with {@link Response}. + */ + Response getWithResponse(String deploymentStacksWhatIfResultName, Context context); + + /** + * Gets the Deployment stack with the given name. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Deployment stack with the given name. + */ + DeploymentStacksWhatIfResult get(String deploymentStacksWhatIfResultName); + + /** + * Lists Deployment stacks at the specified scope. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Lists Deployment stacks at the specified scope. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentStacksWhatIfResult list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + DeploymentStacksWhatIfResult createOrUpdate(String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource); + + /** + * Creates or updates a Deployment stack at the specified scope. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment stack object. + */ + DeploymentStacksWhatIfResult createOrUpdate(String deploymentStacksWhatIfResultName, + DeploymentStacksWhatIfResultInner resource, Context context); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param unmanageActionResources Flag to indicate delete rather than detach for unmanaged resources. + * @param unmanageActionResourceGroups Flag to indicate delete rather than detach for unmanaged resource groups. + * @param unmanageActionManagementGroups Flag to indicate delete rather than detach for unmanaged management groups. + * @param unmanageActionResourcesWithoutDeleteSupport Some resources do not support deletion. This flag will denote + * how the stack should handle those resources. + * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is not + * correctly synchronized. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + Response deleteWithResponse(String deploymentStacksWhatIfResultName, + DeploymentStacksDeleteDetachEnum unmanageActionResources, + DeploymentStacksDeleteDetachEnum unmanageActionResourceGroups, + DeploymentStacksDeleteDetachEnum unmanageActionManagementGroups, + DeploymentStacksResourcesWithoutDeleteSupportEnum unmanageActionResourcesWithoutDeleteSupport, + Boolean bypassStackOutOfSyncError, Context context); + + /** + * Deletes a Deployment stack by name at the specified scope. When operation completes, status code 200 returned + * without content. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DeploymentStacksWhatIfResult whatIf(String deploymentStacksWhatIfResultName); + + /** + * Returns property-level changes that will be made by the deployment if executed. + * + * @param deploymentStacksWhatIfResultName Name of the deployment stack what-if result. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DeploymentStacksWhatIfResult whatIf(String deploymentStacksWhatIfResultName, Context context); +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ErrorAdditionalInfo.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ErrorAdditionalInfo.java new file mode 100644 index 000000000000..1bbd5368428a --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ErrorAdditionalInfo.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.BinaryData; +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 resource management error additional info. + */ +@Immutable +public final class ErrorAdditionalInfo implements JsonSerializable { + /* + * The additional info type. + */ + private String type; + + /* + * The additional info. + */ + private BinaryData info; + + /** + * Creates an instance of ErrorAdditionalInfo class. + */ + private ErrorAdditionalInfo() { + } + + /** + * Get the type property: The additional info type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the info property: The additional info. + * + * @return the info value. + */ + public BinaryData info() { + return this.info; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ErrorAdditionalInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ErrorAdditionalInfo 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 ErrorAdditionalInfo. + */ + public static ErrorAdditionalInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ErrorAdditionalInfo deserializedErrorAdditionalInfo = new ErrorAdditionalInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedErrorAdditionalInfo.type = reader.getString(); + } else if ("info".equals(fieldName)) { + deserializedErrorAdditionalInfo.info + = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + } else { + reader.skipChildren(); + } + } + + return deserializedErrorAdditionalInfo; + }); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultParameterReference.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultParameterReference.java index 795b64ae4ba0..615b88d02fb8 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultParameterReference.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultParameterReference.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.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; @@ -98,28 +97,6 @@ public KeyVaultParameterReference withSecretVersion(String secretVersion) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyVault() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVault in model KeyVaultParameterReference")); - } else { - keyVault().validate(); - } - if (secretName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property secretName in model KeyVaultParameterReference")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(KeyVaultParameterReference.class); - /** * {@inheritDoc} */ diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultReference.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultReference.java index 331544cd0c52..86a10c960c9f 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultReference.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultReference.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.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; @@ -48,20 +47,6 @@ public KeyVaultReference withId(String id) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property id in model KeyVaultReference")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(KeyVaultReference.class); - /** * {@inheritDoc} */ diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ManagedResourceReference.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ManagedResourceReference.java index a3205f22b876..ec793f4b198f 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ManagedResourceReference.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ManagedResourceReference.java @@ -1,19 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.Map; /** * The managed resource model. */ -@Fluent +@Immutable public final class ManagedResourceReference extends ResourceReference { /* * Current management state of the resource in the deployment stack. @@ -26,14 +28,34 @@ public final class ManagedResourceReference extends ResourceReference { private DenyStatusMode denyStatus; /* - * The resourceId of a resource managed by the deployment stack. + * The API version the resource was deployed with + */ + private String apiVersion; + + /* + * The extensible resource identifiers. + */ + private Map identifiers; + + /* + * The resource type. + */ + private String type; + + /* + * The extension the resource was deployed with. + */ + private DeploymentExtension extension; + + /* + * The ARM Resource ID of a resource managed by the deployment stack. */ private String id; /** * Creates an instance of ManagedResourceReference class. */ - public ManagedResourceReference() { + private ManagedResourceReference() { } /** @@ -46,53 +68,62 @@ public ResourceStatusMode status() { } /** - * Set the status property: Current management state of the resource in the deployment stack. + * Get the denyStatus property: denyAssignment settings applied to the resource. * - * @param status the status value to set. - * @return the ManagedResourceReference object itself. + * @return the denyStatus value. */ - public ManagedResourceReference withStatus(ResourceStatusMode status) { - this.status = status; - return this; + public DenyStatusMode denyStatus() { + return this.denyStatus; } /** - * Get the denyStatus property: denyAssignment settings applied to the resource. + * Get the apiVersion property: The API version the resource was deployed with. * - * @return the denyStatus value. + * @return the apiVersion value. */ - public DenyStatusMode denyStatus() { - return this.denyStatus; + @Override + public String apiVersion() { + return this.apiVersion; } /** - * Set the denyStatus property: denyAssignment settings applied to the resource. + * Get the identifiers property: The extensible resource identifiers. * - * @param denyStatus the denyStatus value to set. - * @return the ManagedResourceReference object itself. + * @return the identifiers value. */ - public ManagedResourceReference withDenyStatus(DenyStatusMode denyStatus) { - this.denyStatus = denyStatus; - return this; + @Override + public Map identifiers() { + return this.identifiers; } /** - * Get the id property: The resourceId of a resource managed by the deployment stack. + * Get the type property: The resource type. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** - * Validates the instance. + * Get the extension property: The extension the resource was deployed with. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the extension value. */ @Override - public void validate() { + public DeploymentExtension extension() { + return this.extension; + } + + /** + * Get the id property: The ARM Resource ID of a resource managed by the deployment stack. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; } /** @@ -123,6 +154,16 @@ public static ManagedResourceReference fromJson(JsonReader jsonReader) throws IO if ("id".equals(fieldName)) { deserializedManagedResourceReference.id = reader.getString(); + } else if ("extension".equals(fieldName)) { + deserializedManagedResourceReference.extension = DeploymentExtension.fromJson(reader); + } else if ("type".equals(fieldName)) { + deserializedManagedResourceReference.type = reader.getString(); + } else if ("identifiers".equals(fieldName)) { + Map identifiers = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedManagedResourceReference.identifiers = identifiers; + } else if ("apiVersion".equals(fieldName)) { + deserializedManagedResourceReference.apiVersion = reader.getString(); } else if ("status".equals(fieldName)) { deserializedManagedResourceReference.status = ResourceStatusMode.fromString(reader.getString()); } else if ("denyStatus".equals(fieldName)) { diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReference.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReference.java index 01a3d7a22f8f..52702ccdd8b8 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReference.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReference.java @@ -1,15 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.BinaryData; 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 resourceId model. @@ -17,18 +19,38 @@ @Immutable public class ResourceReference implements JsonSerializable { /* - * The resourceId of a resource managed by the deployment stack. + * The ARM Resource ID of a resource managed by the deployment stack. */ private String id; + /* + * The extension the resource was deployed with. + */ + private DeploymentExtension extension; + + /* + * The resource type. + */ + private String type; + + /* + * The extensible resource identifiers. + */ + private Map identifiers; + + /* + * The API version the resource was deployed with + */ + private String apiVersion; + /** * Creates an instance of ResourceReference class. */ - public ResourceReference() { + protected ResourceReference() { } /** - * Get the id property: The resourceId of a resource managed by the deployment stack. + * Get the id property: The ARM Resource ID of a resource managed by the deployment stack. * * @return the id value. */ @@ -37,7 +59,7 @@ public String id() { } /** - * Set the id property: The resourceId of a resource managed by the deployment stack. + * Set the id property: The ARM Resource ID of a resource managed by the deployment stack. * * @param id the id value to set. * @return the ResourceReference object itself. @@ -48,11 +70,83 @@ ResourceReference withId(String id) { } /** - * Validates the instance. + * Get the extension property: The extension the resource was deployed with. + * + * @return the extension value. + */ + public DeploymentExtension extension() { + return this.extension; + } + + /** + * Set the extension property: The extension the resource was deployed with. + * + * @param extension the extension value to set. + * @return the ResourceReference object itself. + */ + ResourceReference withExtension(DeploymentExtension extension) { + this.extension = extension; + return this; + } + + /** + * Get the type property: The resource type. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the type value. */ - public void validate() { + public String type() { + return this.type; + } + + /** + * Set the type property: The resource type. + * + * @param type the type value to set. + * @return the ResourceReference object itself. + */ + ResourceReference withType(String type) { + this.type = type; + return this; + } + + /** + * Get the identifiers property: The extensible resource identifiers. + * + * @return the identifiers value. + */ + public Map identifiers() { + return this.identifiers; + } + + /** + * Set the identifiers property: The extensible resource identifiers. + * + * @param identifiers the identifiers value to set. + * @return the ResourceReference object itself. + */ + ResourceReference withIdentifiers(Map identifiers) { + this.identifiers = identifiers; + return this; + } + + /** + * Get the apiVersion property: The API version the resource was deployed with. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** + * Set the apiVersion property: The API version the resource was deployed with. + * + * @param apiVersion the apiVersion value to set. + * @return the ResourceReference object itself. + */ + ResourceReference withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; } /** @@ -81,6 +175,16 @@ public static ResourceReference fromJson(JsonReader jsonReader) throws IOExcepti if ("id".equals(fieldName)) { deserializedResourceReference.id = reader.getString(); + } else if ("extension".equals(fieldName)) { + deserializedResourceReference.extension = DeploymentExtension.fromJson(reader); + } else if ("type".equals(fieldName)) { + deserializedResourceReference.type = reader.getString(); + } else if ("identifiers".equals(fieldName)) { + Map identifiers = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedResourceReference.identifiers = identifiers; + } else if ("apiVersion".equals(fieldName)) { + deserializedResourceReference.apiVersion = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReferenceExtended.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReferenceExtended.java index 397c920ca642..83ab82ded2fd 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReferenceExtended.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReferenceExtended.java @@ -1,74 +1,112 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.BinaryData; 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 resourceId extended model. This is used to document failed resources with a resourceId and a corresponding error. */ -@Fluent -public final class ResourceReferenceExtended extends ResourceReference { +@Immutable +public final class ResourceReferenceExtended implements JsonSerializable { /* - * The error detail. + * The ARM Resource ID of a resource managed by the deployment stack. */ - private ManagementError error; + private String id; /* - * The resourceId of a resource managed by the deployment stack. + * The extension the resource was deployed with. */ - private String id; + private DeploymentExtension extension; + + /* + * The resource type. + */ + private String type; + + /* + * The extensible resource identifiers. + */ + private Map identifiers; + + /* + * The API version the resource was deployed with + */ + private String apiVersion; + + /* + * The error detail. + */ + private ManagementError error; /** * Creates an instance of ResourceReferenceExtended class. */ - public ResourceReferenceExtended() { + private ResourceReferenceExtended() { } /** - * Get the error property: The error detail. + * Get the id property: The ARM Resource ID of a resource managed by the deployment stack. * - * @return the error value. + * @return the id value. */ - public ManagementError error() { - return this.error; + public String id() { + return this.id; } /** - * Set the error property: The error detail. + * Get the extension property: The extension the resource was deployed with. * - * @param error the error value to set. - * @return the ResourceReferenceExtended object itself. + * @return the extension value. */ - public ResourceReferenceExtended withError(ManagementError error) { - this.error = error; - return this; + public DeploymentExtension extension() { + return this.extension; } /** - * Get the id property: The resourceId of a resource managed by the deployment stack. + * Get the type property: The resource type. * - * @return the id value. + * @return the type value. */ - @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** - * Validates the instance. + * Get the identifiers property: The extensible resource identifiers. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the identifiers value. */ - @Override - public void validate() { + public Map identifiers() { + return this.identifiers; + } + + /** + * Get the apiVersion property: The API version the resource was deployed with. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** + * Get the error property: The error detail. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; } /** @@ -98,6 +136,16 @@ public static ResourceReferenceExtended fromJson(JsonReader jsonReader) throws I if ("id".equals(fieldName)) { deserializedResourceReferenceExtended.id = reader.getString(); + } else if ("extension".equals(fieldName)) { + deserializedResourceReferenceExtended.extension = DeploymentExtension.fromJson(reader); + } else if ("type".equals(fieldName)) { + deserializedResourceReferenceExtended.type = reader.getString(); + } else if ("identifiers".equals(fieldName)) { + Map identifiers = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedResourceReferenceExtended.identifiers = identifiers; + } else if ("apiVersion".equals(fieldName)) { + deserializedResourceReferenceExtended.apiVersion = reader.getString(); } else if ("error".equals(fieldName)) { deserializedResourceReferenceExtended.error = ManagementError.fromJson(reader); } else { diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceStatusMode.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceStatusMode.java index bc830c8c1d57..7848f36d7985 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceStatusMode.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceStatusMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.models; @@ -12,17 +12,18 @@ */ public final class ResourceStatusMode extends ExpandableStringEnum { /** - * Static value managed for ResourceStatusMode. + * This resource is managed by the deployment stack. */ public static final ResourceStatusMode MANAGED = fromString("managed"); /** - * Static value removeDenyFailed for ResourceStatusMode. + * Unable to remove the deny assignment on resource. */ public static final ResourceStatusMode REMOVE_DENY_FAILED = fromString("removeDenyFailed"); /** - * Static value deleteFailed for ResourceStatusMode. + * Unable to delete the resource from Azure. The delete will be retried on the next stack deployment, or can be + * deleted manually. */ public static final ResourceStatusMode DELETE_FAILED = fromString("deleteFailed"); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/UnmanageActionManagementGroupMode.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/UnmanageActionManagementGroupMode.java deleted file mode 100644 index f60e5192079e..000000000000 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/UnmanageActionManagementGroupMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.deploymentstacks.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for UnmanageActionManagementGroupMode. - */ -public final class UnmanageActionManagementGroupMode extends ExpandableStringEnum { - /** - * Static value delete for UnmanageActionManagementGroupMode. - */ - public static final UnmanageActionManagementGroupMode DELETE = fromString("delete"); - - /** - * Static value detach for UnmanageActionManagementGroupMode. - */ - public static final UnmanageActionManagementGroupMode DETACH = fromString("detach"); - - /** - * Creates a new instance of UnmanageActionManagementGroupMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UnmanageActionManagementGroupMode() { - } - - /** - * Creates or finds a UnmanageActionManagementGroupMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding UnmanageActionManagementGroupMode. - */ - public static UnmanageActionManagementGroupMode fromString(String name) { - return fromString(name, UnmanageActionManagementGroupMode.class); - } - - /** - * Gets known UnmanageActionManagementGroupMode values. - * - * @return known UnmanageActionManagementGroupMode values. - */ - public static Collection values() { - return values(UnmanageActionManagementGroupMode.class); - } -} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/UnmanageActionResourceGroupMode.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/UnmanageActionResourceGroupMode.java deleted file mode 100644 index bb10cbfed4ea..000000000000 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/UnmanageActionResourceGroupMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.deploymentstacks.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for UnmanageActionResourceGroupMode. - */ -public final class UnmanageActionResourceGroupMode extends ExpandableStringEnum { - /** - * Static value delete for UnmanageActionResourceGroupMode. - */ - public static final UnmanageActionResourceGroupMode DELETE = fromString("delete"); - - /** - * Static value detach for UnmanageActionResourceGroupMode. - */ - public static final UnmanageActionResourceGroupMode DETACH = fromString("detach"); - - /** - * Creates a new instance of UnmanageActionResourceGroupMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UnmanageActionResourceGroupMode() { - } - - /** - * Creates or finds a UnmanageActionResourceGroupMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding UnmanageActionResourceGroupMode. - */ - public static UnmanageActionResourceGroupMode fromString(String name) { - return fromString(name, UnmanageActionResourceGroupMode.class); - } - - /** - * Gets known UnmanageActionResourceGroupMode values. - * - * @return known UnmanageActionResourceGroupMode values. - */ - public static Collection values() { - return values(UnmanageActionResourceGroupMode.class); - } -} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/UnmanageActionResourceMode.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/UnmanageActionResourceMode.java deleted file mode 100644 index eea9cf90f5c1..000000000000 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/UnmanageActionResourceMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resources.deploymentstacks.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for UnmanageActionResourceMode. - */ -public final class UnmanageActionResourceMode extends ExpandableStringEnum { - /** - * Static value delete for UnmanageActionResourceMode. - */ - public static final UnmanageActionResourceMode DELETE = fromString("delete"); - - /** - * Static value detach for UnmanageActionResourceMode. - */ - public static final UnmanageActionResourceMode DETACH = fromString("detach"); - - /** - * Creates a new instance of UnmanageActionResourceMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UnmanageActionResourceMode() { - } - - /** - * Creates or finds a UnmanageActionResourceMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding UnmanageActionResourceMode. - */ - public static UnmanageActionResourceMode fromString(String name) { - return fromString(name, UnmanageActionResourceMode.class); - } - - /** - * Gets known UnmanageActionResourceMode values. - * - * @return known UnmanageActionResourceMode values. - */ - public static Collection values() { - return values(UnmanageActionResourceMode.class); - } -} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ValidationLevel.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ValidationLevel.java new file mode 100644 index 000000000000..182240aaba57 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ValidationLevel.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The level of validation performed on the deployment. + */ +public final class ValidationLevel extends ExpandableStringEnum { + /** + * Static analysis of the template is performed. + */ + public static final ValidationLevel TEMPLATE = fromString("Template"); + + /** + * Static analysis of the template is performed and resource declarations are sent to resource providers for + * semantic validation. Validates that the caller has RBAC write permissions on each resource. + */ + public static final ValidationLevel PROVIDER = fromString("Provider"); + + /** + * Static analysis of the template is performed and resource declarations are sent to resource providers for + * semantic validation. Skips validating that the caller has RBAC write permissions on each resource. + */ + public static final ValidationLevel PROVIDER_NO_RBAC = fromString("ProviderNoRbac"); + + /** + * Creates a new instance of ValidationLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ValidationLevel() { + } + + /** + * Creates or finds a ValidationLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding ValidationLevel. + */ + public static ValidationLevel fromString(String name) { + return fromString(name, ValidationLevel.class); + } + + /** + * Gets known ValidationLevel values. + * + * @return known ValidationLevel values. + */ + public static Collection values() { + return values(ValidationLevel.class); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/package-info.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/package-info.java index b9c96568a99b..daeee8d1117b 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/package-info.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/package-info.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the data models for DeploymentStacksManagementClient. - * DeploymentStacks Client. + * The APIs listed in this specification can be used to manage Deployment stack resources through the Azure Resource + * Manager. */ package com.azure.resourcemanager.resources.deploymentstacks.models; diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/package-info.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/package-info.java index b31c83b30041..cdfa403d11a9 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/package-info.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/package-info.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the classes for DeploymentStacksManagementClient. - * DeploymentStacks Client. + * The APIs listed in this specification can be used to manage Deployment stack resources through the Azure Resource + * Manager. */ package com.azure.resourcemanager.resources.deploymentstacks; diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/module-info.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/module-info.java index 841142ceac9b..789c4429b518 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/module-info.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.resources.deploymentstacks { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.resources.deploymentstacks.fluent.models to com.azure.core; opens com.azure.resourcemanager.resources.deploymentstacks.models to com.azure.core; + opens com.azure.resourcemanager.resources.deploymentstacks.implementation.models to com.azure.core; } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_apiview_properties.json b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_apiview_properties.json new file mode 100644 index 000000000000..74d328b78126 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_apiview_properties.json @@ -0,0 +1,118 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient": "Microsoft.Resources.DeploymentStacks", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginCreateOrUpdateAtManagementGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.createOrUpdate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginCreateOrUpdateAtResourceGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.createOrUpdate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginCreateOrUpdateAtSubscription": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.createOrUpdate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginDelete": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.delete", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginDeleteAtManagementGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.delete", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginDeleteAtSubscription": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.delete", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginValidateStackAtManagementGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.validateStack", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginValidateStackAtResourceGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.validateStack", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginValidateStackAtSubscription": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.validateStack", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.createOrUpdateAtManagementGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.createOrUpdate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.createOrUpdateAtResourceGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.createOrUpdate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.createOrUpdateAtSubscription": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.createOrUpdate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.delete": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.delete", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.deleteAtManagementGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.delete", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.deleteAtSubscription": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.delete", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtManagementGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.exportTemplate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtManagementGroupWithResponse": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.exportTemplate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtResourceGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.exportTemplate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtResourceGroupWithResponse": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.exportTemplate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtSubscription": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.exportTemplate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtSubscriptionWithResponse": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.exportTemplate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtManagementGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.get", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtManagementGroupWithResponse": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.get", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtSubscription": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.get", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtSubscriptionWithResponse": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.get", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getByResourceGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.get", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getByResourceGroupWithResponse": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.get", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.list": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.list", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.listAtManagementGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.list", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.listByResourceGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.list", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.validateStackAtManagementGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.validateStack", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.validateStackAtResourceGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.validateStack", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.validateStackAtSubscription": "Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.validateStack", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksManagementClient": "Microsoft.Resources.DeploymentStacks", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.beginCreateOrUpdate": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.createOrUpdate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.beginWhatIf": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.whatIf", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.createOrUpdate": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.createOrUpdate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.delete": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.delete", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.deleteWithResponse": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.delete", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.get": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.get", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.getWithResponse": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.get", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.list": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.list", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.whatIf": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.whatIf", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.beginCreateOrUpdate": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.createOrUpdate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.beginWhatIf": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.whatIf", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.createOrUpdate": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.createOrUpdate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.delete": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.delete", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.deleteWithResponse": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.delete", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.getByResourceGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.get", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.getByResourceGroupWithResponse": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.get", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.listByResourceGroup": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.list", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.whatIf": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.whatIf", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.beginCreateOrUpdate": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.createOrUpdate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.beginWhatIf": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.whatIf", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.createOrUpdate": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.createOrUpdate", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.delete": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.delete", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.deleteWithResponse": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.delete", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.get": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.get", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.getWithResponse": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.get", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.list": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.list", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.whatIf": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.whatIf", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner": "Microsoft.Resources.DeploymentStacks.DeploymentStack", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackProperties": "Microsoft.Resources.DeploymentStacks.DeploymentStackProperties", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackTemplateDefinitionInner": "Microsoft.Resources.DeploymentStacks.DeploymentStackTemplateDefinition", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackValidateResultInner": "Microsoft.Resources.DeploymentStacks.DeploymentStackValidateResult", + "com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResult", + "com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksManagementClientBuilder": "Microsoft.Resources.DeploymentStacks", + "com.azure.resourcemanager.resources.deploymentstacks.implementation.models.DeploymentStackListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.resources.deploymentstacks.implementation.models.DeploymentStacksWhatIfResultListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage": "Microsoft.Resources.DeploymentStacks.ActionOnUnmanage", + "com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings": "Microsoft.Resources.DeploymentStacks.DenySettings", + "com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode": "Microsoft.Resources.DeploymentStacks.DenySettingsMode", + "com.azure.resourcemanager.resources.deploymentstacks.models.DenyStatusMode": "Microsoft.Resources.DeploymentStacks.DenyStatusMode", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtension": "Microsoft.Resources.DeploymentStacks.DeploymentExtension", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig": "Microsoft.Resources.DeploymentStacks.DeploymentExtensionConfig", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem": "Microsoft.Resources.DeploymentStacks.DeploymentExtensionConfigItem", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInput": "Microsoft.Resources.DeploymentStacks.DeploymentExternalInput", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInputDefinition": "Microsoft.Resources.DeploymentStacks.DeploymentExternalInputDefinition", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter": "Microsoft.Resources.DeploymentStacks.DeploymentParameter", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProvisioningState": "Microsoft.Resources.DeploymentStacks.DeploymentStackProvisioningState", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackValidateProperties": "Microsoft.Resources.DeploymentStacks.DeploymentStackValidateProperties", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBase": "Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeBase", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBaseDenyStatusMode": "Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeBase", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBaseDeploymentStacksManagementStatus": "Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeBase", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeDeltaDenySettings": "Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeDelta", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeDeltaRecord": "Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeDelta", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDebugSetting": "Microsoft.Resources.DeploymentStacks.DeploymentStacksDebugSetting", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum": "Microsoft.Resources.DeploymentStacks.DeploymentStacksDeleteDetachEnum", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDiagnostic": "Microsoft.Resources.DeploymentStacks.DeploymentStacksDiagnostic", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDiagnosticLevel": "Microsoft.Resources.DeploymentStacks.DeploymentStacksDiagnosticLevel", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksManagementStatus": "Microsoft.Resources.DeploymentStacks.DeploymentStacksManagementStatus", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksParametersLink": "Microsoft.Resources.DeploymentStacks.DeploymentStacksParametersLink", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum": "Microsoft.Resources.DeploymentStacks.DeploymentStacksResourcesWithoutDeleteSupportEnum", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink": "Microsoft.Resources.DeploymentStacks.DeploymentStacksTemplateLink", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChange": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfChange", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChangeCertainty": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfChangeCertainty", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChangeType": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfChangeType", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfPropertyChange": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfPropertyChange", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfPropertyChangeType": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfPropertyChangeType", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResourceChange": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResourceChange", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultProperties", + "com.azure.resourcemanager.resources.deploymentstacks.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "com.azure.resourcemanager.resources.deploymentstacks.models.KeyVaultParameterReference": "Microsoft.Resources.DeploymentStacks.KeyVaultParameterReference", + "com.azure.resourcemanager.resources.deploymentstacks.models.KeyVaultReference": "Microsoft.Resources.DeploymentStacks.KeyVaultReference", + "com.azure.resourcemanager.resources.deploymentstacks.models.ManagedResourceReference": "Microsoft.Resources.DeploymentStacks.ManagedResourceReference", + "com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReference": "Microsoft.Resources.DeploymentStacks.ResourceReference", + "com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReferenceExtended": "Microsoft.Resources.DeploymentStacks.ResourceReferenceExtended", + "com.azure.resourcemanager.resources.deploymentstacks.models.ResourceStatusMode": "Microsoft.Resources.DeploymentStacks.ResourceStatusMode", + "com.azure.resourcemanager.resources.deploymentstacks.models.ValidationLevel": "Microsoft.Resources.DeploymentStacks.ValidationLevel" + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_metadata.json b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_metadata.json new file mode 100644 index 000000000000..9ecf3e969b4c --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersion":"2025-07-01","crossLanguageDefinitions":{"com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient":"Microsoft.Resources.DeploymentStacks","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginCreateOrUpdateAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginCreateOrUpdateAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginCreateOrUpdateAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginDelete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginDeleteAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginDeleteAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginValidateStackAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginValidateStackAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginValidateStackAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.createOrUpdateAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.createOrUpdateAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.createOrUpdateAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.delete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.deleteAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.deleteAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtManagementGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtResourceGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtSubscriptionWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtManagementGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtSubscriptionWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getByResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getByResourceGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.list":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.listAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.listByResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.validateStackAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.validateStackAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.validateStackAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksManagementClient":"Microsoft.Resources.DeploymentStacks","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.beginCreateOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.beginWhatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.createOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.delete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.deleteWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.get":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.getWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.list":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.whatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.beginCreateOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.beginWhatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.createOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.delete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.deleteWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.getByResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.getByResourceGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.listByResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.whatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.beginCreateOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.beginWhatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.createOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.delete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.deleteWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.get":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.getWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.list":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.whatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner":"Microsoft.Resources.DeploymentStacks.DeploymentStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackProperties":"Microsoft.Resources.DeploymentStacks.DeploymentStackProperties","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackTemplateDefinitionInner":"Microsoft.Resources.DeploymentStacks.DeploymentStackTemplateDefinition","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackValidateResultInner":"Microsoft.Resources.DeploymentStacks.DeploymentStackValidateResult","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResult","com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksManagementClientBuilder":"Microsoft.Resources.DeploymentStacks","com.azure.resourcemanager.resources.deploymentstacks.implementation.models.DeploymentStackListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.resources.deploymentstacks.implementation.models.DeploymentStacksWhatIfResultListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage":"Microsoft.Resources.DeploymentStacks.ActionOnUnmanage","com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings":"Microsoft.Resources.DeploymentStacks.DenySettings","com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode":"Microsoft.Resources.DeploymentStacks.DenySettingsMode","com.azure.resourcemanager.resources.deploymentstacks.models.DenyStatusMode":"Microsoft.Resources.DeploymentStacks.DenyStatusMode","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtension":"Microsoft.Resources.DeploymentStacks.DeploymentExtension","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig":"Microsoft.Resources.DeploymentStacks.DeploymentExtensionConfig","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem":"Microsoft.Resources.DeploymentStacks.DeploymentExtensionConfigItem","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInput":"Microsoft.Resources.DeploymentStacks.DeploymentExternalInput","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInputDefinition":"Microsoft.Resources.DeploymentStacks.DeploymentExternalInputDefinition","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter":"Microsoft.Resources.DeploymentStacks.DeploymentParameter","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProvisioningState":"Microsoft.Resources.DeploymentStacks.DeploymentStackProvisioningState","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackValidateProperties":"Microsoft.Resources.DeploymentStacks.DeploymentStackValidateProperties","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBase":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeBase","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBaseDenyStatusMode":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeBase","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBaseDeploymentStacksManagementStatus":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeBase","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeDeltaDenySettings":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeDelta","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeDeltaRecord":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeDelta","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDebugSetting":"Microsoft.Resources.DeploymentStacks.DeploymentStacksDebugSetting","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum":"Microsoft.Resources.DeploymentStacks.DeploymentStacksDeleteDetachEnum","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDiagnostic":"Microsoft.Resources.DeploymentStacks.DeploymentStacksDiagnostic","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDiagnosticLevel":"Microsoft.Resources.DeploymentStacks.DeploymentStacksDiagnosticLevel","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksManagementStatus":"Microsoft.Resources.DeploymentStacks.DeploymentStacksManagementStatus","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksParametersLink":"Microsoft.Resources.DeploymentStacks.DeploymentStacksParametersLink","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum":"Microsoft.Resources.DeploymentStacks.DeploymentStacksResourcesWithoutDeleteSupportEnum","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink":"Microsoft.Resources.DeploymentStacks.DeploymentStacksTemplateLink","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChange":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfChange","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChangeCertainty":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfChangeCertainty","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChangeType":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfChangeType","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfPropertyChange":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfPropertyChange","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfPropertyChangeType":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfPropertyChangeType","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResourceChange":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResourceChange","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultProperties","com.azure.resourcemanager.resources.deploymentstacks.models.ErrorAdditionalInfo":"Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo","com.azure.resourcemanager.resources.deploymentstacks.models.KeyVaultParameterReference":"Microsoft.Resources.DeploymentStacks.KeyVaultParameterReference","com.azure.resourcemanager.resources.deploymentstacks.models.KeyVaultReference":"Microsoft.Resources.DeploymentStacks.KeyVaultReference","com.azure.resourcemanager.resources.deploymentstacks.models.ManagedResourceReference":"Microsoft.Resources.DeploymentStacks.ManagedResourceReference","com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReference":"Microsoft.Resources.DeploymentStacks.ResourceReference","com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReferenceExtended":"Microsoft.Resources.DeploymentStacks.ResourceReferenceExtended","com.azure.resourcemanager.resources.deploymentstacks.models.ResourceStatusMode":"Microsoft.Resources.DeploymentStacks.ResourceStatusMode","com.azure.resourcemanager.resources.deploymentstacks.models.ValidationLevel":"Microsoft.Resources.DeploymentStacks.ValidationLevel"},"generatedFiles":["src/main/java/com/azure/resourcemanager/resources/deploymentstacks/DeploymentStacksManager.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksManagementClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtManagementGroupsClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtResourceGroupsClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackInner.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackProperties.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackTemplateDefinitionInner.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackValidateResultInner.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStacksWhatIfResultInner.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/package-info.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackTemplateDefinitionImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackValidateResultImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/models/DeploymentStackListResult.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/models/DeploymentStacksWhatIfResultListResult.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/package-info.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ActionOnUnmanage.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettings.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettingsMode.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenyStatusMode.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtension.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfig.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfigItem.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInput.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInputDefinition.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentParameter.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStack.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProvisioningState.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackTemplateDefinition.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateProperties.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateResult.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacks.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBase.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDenyStatusMode.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDeploymentStacksManagementStatus.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaDenySettings.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaRecord.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDebugSetting.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDeleteDetachEnum.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnostic.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnosticLevel.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksManagementStatus.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksParametersLink.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksResourcesWithoutDeleteSupportEnum.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksTemplateLink.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChange.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeCertainty.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeType.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChange.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChangeType.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResourceChange.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResult.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultProperties.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtManagementGroups.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtResourceGroups.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtSubscriptions.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ErrorAdditionalInfo.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultParameterReference.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultReference.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ManagedResourceReference.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReference.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReferenceExtended.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceStatusMode.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ValidationLevel.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/package-info.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources-deploymentstacks/proxy-config.json b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources-deploymentstacks/proxy-config.json index 798f5605931c..63d147be7aef 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources-deploymentstacks/proxy-config.json +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources-deploymentstacks/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksClientImpl$DeploymentStacksService"]] \ No newline at end of file +[["com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksClientImpl$DeploymentStacksService"],["com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksWhatIfResultsAtManagementGroupsClientImpl$DeploymentStacksWhatIfResultsAtManagementGroupsService"],["com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksWhatIfResultsAtResourceGroupsClientImpl$DeploymentStacksWhatIfResultsAtResourceGroupsService"],["com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksWhatIfResultsAtSubscriptionsClientImpl$DeploymentStacksWhatIfResultsAtSubscriptionsService"]] \ No newline at end of file diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources-deploymentstacks/reflect-config.json b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources-deploymentstacks/reflect-config.json index 2837f5ef8aa5..edbd4b4dcd8c 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources-deploymentstacks/reflect-config.json +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-resources-deploymentstacks/reflect-config.json @@ -1 +1 @@ -[{"name":"com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackValidateResultInner","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.AzureResourceBase","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackValidateProperties","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDebugSetting","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksParametersLink","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.KeyVaultParameterReference","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.KeyVaultReference","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.ManagedResourceReference","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReference","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReferenceExtended","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true}] \ No newline at end of file +[{"name":"com.azure.resourcemanager.resources.deploymentstacks.models.ErrorAdditionalInfo","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true}] \ No newline at end of file diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java index 6c8431073308..a8451e1154aa 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java @@ -1,16 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -20,30 +23,37 @@ */ public final class DeploymentStacksCreateOrUpdateAtManagementGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackManagementGroupCreate.json + * x-ms-original-file: 2025-07-01/DeploymentStackManagementGroupCreate.json */ /** - * Sample code: DeploymentStacksManagementGroupCreateOrUpdate. + * Sample code: Create or update a management group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksManagementGroupCreateOrUpdate( + public static void createOrUpdateAManagementGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .createOrUpdateAtManagementGroup("myMg", "simpleDeploymentStack", new DeploymentStackInner() - .withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withProperties(new DeploymentStackProperties() - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .createOrUpdateAtManagementGroup("myMg", "simpleDeploymentStack", + new DeploymentStackInner().withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .withParameters(mapOf("parameter1", + new DeploymentParameter() + .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) + .withExtensionConfigs( + mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", + new DeploymentExtensionConfigItem() + .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), + "configOne", + new DeploymentExtensionConfigItem().withValue( + BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false))), + .withApplyToChildScopes(false)), com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java index ffc015dd8042..3827f92ac359 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java @@ -1,15 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -19,31 +22,39 @@ */ public final class DeploymentStacksCreateOrUpdateAtResourceGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackResourceGroupCreate.json + * x-ms-original-file: 2025-07-01/DeploymentStackResourceGroupCreate.json */ /** - * Sample code: DeploymentStacksResourceGroupCreateOrUpdate. + * Sample code: Create or update a resource group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksResourceGroupCreateOrUpdate( + public static void createOrUpdateAResourceGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .define("simpleDeploymentStack") .withExistingResourceGroup("deploymentStacksRG") .withRegion("eastus") .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withProperties(new DeploymentStackProperties() - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false))) + .withParameters(mapOf("parameter1", + new DeploymentParameter().withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) + .withExtensionConfigs( + mapOf("contoso", + new DeploymentExtensionConfig() + .withAdditionalProperties( + mapOf("configTwo", + new DeploymentExtensionConfigItem() + .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), + "configOne", + new DeploymentExtensionConfigItem().withValue( + BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false)) .create(); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java index 1f67448b875d..fd74d2f86263 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java @@ -1,16 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -20,29 +23,37 @@ */ public final class DeploymentStacksCreateOrUpdateAtSubscriptionSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackSubscriptionCreate.json + * x-ms-original-file: 2025-07-01/DeploymentStackSubscriptionCreate.json */ /** - * Sample code: DeploymentStacksSubscriptionCreateOrUpdate. + * Sample code: Create or update a subscription Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksSubscriptionCreateOrUpdate( + public static void createOrUpdateASubscriptionDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .createOrUpdateAtSubscription("simpleDeploymentStack", new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withProperties(new DeploymentStackProperties() - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .createOrUpdateAtSubscription("simpleDeploymentStack", + new DeploymentStackInner().withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .withParameters(mapOf("parameter1", + new DeploymentParameter() + .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) + .withExtensionConfigs( + mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", + new DeploymentExtensionConfigItem() + .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), + "configOne", + new DeploymentExtensionConfigItem().withValue( + BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false))), + .withApplyToChildScopes(false)), com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtManagementGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtManagementGroupSamples.java index 3e9243d1209c..ae5a3fc60af6 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtManagementGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtManagementGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -9,19 +9,17 @@ */ public final class DeploymentStacksDeleteAtManagementGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackManagementGroupDelete.json + * x-ms-original-file: 2025-07-01/DeploymentStackManagementGroupDelete.json */ /** - * Sample code: DeploymentStacksManagementGroupDelete. + * Sample code: Delete a management group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksManagementGroupDelete( + public static void deleteAManagementGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .deleteAtManagementGroup("myMg", "simpleDeploymentStack", null, null, null, null, + .deleteAtManagementGroup("myMg", "simpleDeploymentStack", null, null, null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtSubscriptionSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtSubscriptionSamples.java index 7ce79a87b806..7e4a7d7100b6 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtSubscriptionSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtSubscriptionSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -9,18 +9,17 @@ */ public final class DeploymentStacksDeleteAtSubscriptionSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackSubscriptionDelete.json + * x-ms-original-file: 2025-07-01/DeploymentStackSubscriptionDelete.json */ /** - * Sample code: DeploymentStacksSubscriptionDelete. + * Sample code: Delete a subscription Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksSubscriptionDelete( + public static void deleteASubscriptionDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .deleteAtSubscription("simpleDeploymentStack", null, null, null, null, com.azure.core.util.Context.NONE); + .deleteAtSubscription("simpleDeploymentStack", null, null, null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteSamples.java index cb36227e20fa..c957941cb3c6 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -9,19 +9,17 @@ */ public final class DeploymentStacksDeleteSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackResourceGroupDelete.json + * x-ms-original-file: 2025-07-01/DeploymentStackResourceGroupDelete.json */ /** - * Sample code: DeploymentStacksResourceGroupDelete. + * Sample code: Delete a resource group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksResourceGroupDelete( + public static void deleteAResourceGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .delete("deploymentStacksRG", "simpleDeploymentStack", null, null, null, null, + .delete("deploymentStacksRG", "simpleDeploymentStack", null, null, null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java index 35daa0a59d66..b07d915d0b98 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtManagementGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -9,16 +9,14 @@ */ public final class DeploymentStacksExportTemplateAtManagementGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackManagementGroupExportTemplate.json + * x-ms-original-file: 2025-07-01/DeploymentStackManagementGroupExportTemplate.json */ /** - * Sample code: DeploymentStacksManagementGroupExportTemplate. + * Sample code: Export the Deployment template for a management group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksManagementGroupExportTemplate( + public static void exportTheDeploymentTemplateForAManagementGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .exportTemplateAtManagementGroupWithResponse("myMg", "simpleDeploymentStack", diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java index 6ad40c6041fb..8633a53b4ccf 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -9,16 +9,14 @@ */ public final class DeploymentStacksExportTemplateAtResourceGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackExportTemplate.json + * x-ms-original-file: 2025-07-01/DeploymentStackExportTemplate.json */ /** - * Sample code: DeploymentStacksResourceGroupExportTemplate. + * Sample code: Export the Deployment template for a resource group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksResourceGroupExportTemplate( + public static void exportTheDeploymentTemplateForAResourceGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .exportTemplateAtResourceGroupWithResponse("deploymentStacksRG", "simpleDeploymentStack", diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java index da3adbd1b987..acf39e1e4f89 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtSubscriptionSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -9,16 +9,14 @@ */ public final class DeploymentStacksExportTemplateAtSubscriptionSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackSubscriptionExportTemplate.json + * x-ms-original-file: 2025-07-01/DeploymentStackSubscriptionExportTemplate.json */ /** - * Sample code: DeploymentStacksSubscriptionExportTemplate. + * Sample code: Export the Deployment template for a subscription Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksSubscriptionExportTemplate( + public static void exportTheDeploymentTemplateForASubscriptionDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .exportTemplateAtSubscriptionWithResponse("simpleDeploymentStack", com.azure.core.util.Context.NONE); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksGetAtManagementGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksGetAtManagementGroupSamples.java index 66aadb0dc8d6..74cef1ecf682 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksGetAtManagementGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksGetAtManagementGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -9,16 +9,14 @@ */ public final class DeploymentStacksGetAtManagementGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackManagementGroupGet.json + * x-ms-original-file: 2025-07-01/DeploymentStackManagementGroupGet.json */ /** - * Sample code: DeploymentStacksManagementGroupGet. + * Sample code: Get a management group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksManagementGroupGet( + public static void getAManagementGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .getAtManagementGroupWithResponse("myMg", "simpleDeploymentStack", com.azure.core.util.Context.NONE); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksGetAtSubscriptionSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksGetAtSubscriptionSamples.java index e879f7048fdb..50c92852337c 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksGetAtSubscriptionSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksGetAtSubscriptionSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -9,16 +9,14 @@ */ public final class DeploymentStacksGetAtSubscriptionSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackSubscriptionGet.json + * x-ms-original-file: 2025-07-01/DeploymentStackSubscriptionGet.json */ /** - * Sample code: DeploymentStacksSubscriptionGet. + * Sample code: Get a subscription Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksSubscriptionGet( + public static void getASubscriptionDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .getAtSubscriptionWithResponse("simpleDeploymentStack", com.azure.core.util.Context.NONE); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksGetByResourceGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksGetByResourceGroupSamples.java index f2d043005040..c4c47ba35416 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksGetByResourceGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -9,16 +9,14 @@ */ public final class DeploymentStacksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackResourceGroupGet.json + * x-ms-original-file: 2025-07-01/DeploymentStackResourceGroupGet.json */ /** - * Sample code: DeploymentStacksResourceGroupGet. + * Sample code: Get a resource group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksResourceGroupGet( + public static void getAResourceGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .getByResourceGroupWithResponse("deploymentStacksRG", "simpleDeploymentStack", diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksListAtManagementGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksListAtManagementGroupSamples.java index 4fb2e407b4d4..90cc43fc9cd8 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksListAtManagementGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksListAtManagementGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -9,16 +9,14 @@ */ public final class DeploymentStacksListAtManagementGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackManagementGroupList.json + * x-ms-original-file: 2025-07-01/DeploymentStackManagementGroupList.json */ /** - * Sample code: DeploymentStacksManagementGroupList. + * Sample code: List management group Deployment stacks. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksManagementGroupList( + public static void listManagementGroupDeploymentStacks( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks().listAtManagementGroup("myMg", com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksListByResourceGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksListByResourceGroupSamples.java index 6b2a13904f53..da6fa25f6a85 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksListByResourceGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -9,16 +9,14 @@ */ public final class DeploymentStacksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackResourceGroupList.json + * x-ms-original-file: 2025-07-01/DeploymentStackResourceGroupList.json */ /** - * Sample code: DeploymentStacksResourceGroupList. + * Sample code: List resource group Deployment stacks. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksResourceGroupList( + public static void listResourceGroupDeploymentStacks( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks().listByResourceGroup("deploymentStacksRG", com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksListSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksListSamples.java index 88c2e67536cf..43cddb682b20 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksListSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -9,16 +9,14 @@ */ public final class DeploymentStacksListSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackSubscriptionList.json + * x-ms-original-file: 2025-07-01/DeploymentStackSubscriptionList.json */ /** - * Sample code: DeploymentStacksSubscriptionList. + * Sample code: List subscription Deployment stacks. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksSubscriptionList( + public static void listSubscriptionDeploymentStacks( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks().list(com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java index 9ea4c3603a40..8866e60352f9 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -21,32 +22,31 @@ */ public final class DeploymentStacksValidateStackAtManagementGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackManagementGroupValidate.json + * x-ms-original-file: 2025-07-01/DeploymentStackManagementGroupValidate.json */ /** - * Sample code: DeploymentStacksManagementGroupValidate. + * Sample code: Validate a management group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksManagementGroupValidate( + public static void validateAManagementGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .validateStackAtManagementGroup("myMg", "simpleDeploymentStack", new DeploymentStackInner() - .withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withProperties(new DeploymentStackProperties() + .validateStackAtManagementGroup("myMg", "simpleDeploymentStack", + new DeploymentStackInner().withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) .withTemplateLink( new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withParameters(mapOf("parameter1", + new DeploymentParameter() + .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DETACH) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DETACH) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false))), + .withApplyToChildScopes(false)), com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java index e977d81c7d2c..8b5fbcfb3fb9 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -21,31 +22,30 @@ */ public final class DeploymentStacksValidateStackAtResourceGroupSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackResourceGroupValidate.json + * x-ms-original-file: 2025-07-01/DeploymentStackResourceGroupValidate.json */ /** - * Sample code: DeploymentStacksResourceGroupValidate. + * Sample code: Validate a resource group Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksResourceGroupValidate( + public static void validateAResourceGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .validateStackAtResourceGroup("deploymentStacksRG", "simpleDeploymentStack", new DeploymentStackInner() - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withProperties(new DeploymentStackProperties() + .validateStackAtResourceGroup("deploymentStacksRG", "simpleDeploymentStack", + new DeploymentStackInner().withTags(mapOf("tagkey", "fakeTokenPlaceholder")) .withTemplateLink( new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withParameters(mapOf("parameter1", + new DeploymentParameter() + .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false))), + .withApplyToChildScopes(false)), com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java index 1fbf34c9d649..4956d12b74b2 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -21,31 +22,31 @@ */ public final class DeploymentStacksValidateStackAtSubscriptionSamples { /* - * x-ms-original-file: - * specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/stable/2024-03-01/examples/ - * DeploymentStackSubscriptionValidate.json + * x-ms-original-file: 2025-07-01/DeploymentStackSubscriptionValidate.json */ /** - * Sample code: DeploymentStacksSubscriptionValidate. + * Sample code: Validate a subscription Deployment stack. * * @param manager Entry point to DeploymentStacksManager. */ - public static void deploymentStacksSubscriptionValidate( + public static void validateASubscriptionDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .validateStackAtSubscription("simpleDeploymentStack", new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withProperties(new DeploymentStackProperties() + .validateStackAtSubscription("simpleDeploymentStack", + new DeploymentStackInner().withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) .withTemplateLink( new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withParameters(mapOf("parameter1", + new DeploymentParameter() + .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false))), + .withApplyToChildScopes(false)), com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupCreateOrUpdateSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupCreateOrUpdateSamples.java new file mode 100644 index 000000000000..8da41a484c26 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupCreateOrUpdateSamples.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DeploymentStacksWhatIfResultsAtManagementGroup CreateOrUpdate. + */ +public final class DeploymentStacksWhatIfResultsAtManagementGroupCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsManagementGroupCreate.json + */ + /** + * Sample code: Create or update a management group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void createOrUpdateAManagementGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtManagementGroups() + .createOrUpdate("myMg", "simpleDeploymentStackWhatIfResult", + new DeploymentStacksWhatIfResultInner() + .withProperties(new DeploymentStacksWhatIfResultProperties() + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf()) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", + new DeploymentExtensionConfigItem() + .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), + "configOne", + new DeploymentExtensionConfigItem().withValue( + BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) + .withActionOnUnmanage(new ActionOnUnmanage() + .withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings( + new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) + .withDeploymentStackResourceId( + "/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") + .withRetentionInterval(Duration.parse("P7D"))) + .withLocation("eastus"), + 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/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupDeleteSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupDeleteSamples.java new file mode 100644 index 000000000000..ca20c508715a --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +/** + * Samples for DeploymentStacksWhatIfResultsAtManagementGroup Delete. + */ +public final class DeploymentStacksWhatIfResultsAtManagementGroupDeleteSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsManagementGroupDelete.json + */ + /** + * Sample code: Delete a management group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void deleteAManagementGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtManagementGroups() + .deleteWithResponse("myMg", "simpleDeploymentStack", null, null, null, null, null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupGetSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupGetSamples.java new file mode 100644 index 000000000000..b4363865f37f --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +/** + * Samples for DeploymentStacksWhatIfResultsAtManagementGroup Get. + */ +public final class DeploymentStacksWhatIfResultsAtManagementGroupGetSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsManagementGroupGet.json + */ + /** + * Sample code: Get a management group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void getAManagementGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtManagementGroups() + .getWithResponse("myMg", "simpleDeploymentStackWhatIfResult", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupListSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupListSamples.java new file mode 100644 index 000000000000..19a4a39e2393 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +/** + * Samples for DeploymentStacksWhatIfResultsAtManagementGroup List. + */ +public final class DeploymentStacksWhatIfResultsAtManagementGroupListSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsManagementGroupList.json + */ + /** + * Sample code: List the available Deployment stack what-if results at management group scope. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void listTheAvailableDeploymentStackWhatIfResultsAtManagementGroupScope( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtManagementGroups().list("myMg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupWhatIfSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupWhatIfSamples.java new file mode 100644 index 000000000000..017d9b3399b8 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupWhatIfSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +/** + * Samples for DeploymentStacksWhatIfResultsAtManagementGroup WhatIf. + */ +public final class DeploymentStacksWhatIfResultsAtManagementGroupWhatIfSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsManagementGroupWhatIf.json + */ + /** + * Sample code: Get a detailed management group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void getADetailedManagementGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtManagementGroups() + .whatIf("myMg", "changedDeploymentStackWhatIfResult", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupCreateOrUpdateSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupCreateOrUpdateSamples.java new file mode 100644 index 000000000000..ed07b65c588d --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupCreateOrUpdateSamples.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DeploymentStacksWhatIfResultsAtResourceGroup CreateOrUpdate. + */ +public final class DeploymentStacksWhatIfResultsAtResourceGroupCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsResourceGroupCreate.json + */ + /** + * Sample code: Create or update a resource group scoped Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void createOrUpdateAResourceGroupScopedDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtResourceGroups() + .define("simpleDeploymentStackWhatIfResult") + .withExistingResourceGroup("myResourceGroup") + .withRegion("eastus") + .withProperties( + new DeploymentStacksWhatIfResultProperties() + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf()) + .withExtensionConfigs( + mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", + new DeploymentExtensionConfigItem() + .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), + "configOne", + new DeploymentExtensionConfigItem().withValue( + BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) + .withActionOnUnmanage(new ActionOnUnmanage() + .withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) + .withDeploymentStackResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") + .withRetentionInterval(Duration.parse("P7D"))) + .create(); + } + + // 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/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupDeleteSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupDeleteSamples.java new file mode 100644 index 000000000000..74c877b357bf --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +/** + * Samples for DeploymentStacksWhatIfResultsAtResourceGroup Delete. + */ +public final class DeploymentStacksWhatIfResultsAtResourceGroupDeleteSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsResourceGroupDelete.json + */ + /** + * Sample code: Delete a resource group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void deleteAResourceGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtResourceGroups() + .deleteWithResponse("myResourceGroup", "simpleDeploymentStack", null, null, null, null, null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupGetByResourceGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupGetByResourceGroupSamples.java new file mode 100644 index 000000000000..96b888407065 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupGetByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +/** + * Samples for DeploymentStacksWhatIfResultsAtResourceGroup GetByResourceGroup. + */ +public final class DeploymentStacksWhatIfResultsAtResourceGroupGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsResourceGroupGet.json + */ + /** + * Sample code: Get a resource group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void getAResourceGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtResourceGroups() + .getByResourceGroupWithResponse("myResourceGroup", "simpleDeploymentStackWhatIfResult", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupListByResourceGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupListByResourceGroupSamples.java new file mode 100644 index 000000000000..620c0a102b58 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupListByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +/** + * Samples for DeploymentStacksWhatIfResultsAtResourceGroup ListByResourceGroup. + */ +public final class DeploymentStacksWhatIfResultsAtResourceGroupListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsResourceGroupList.json + */ + /** + * Sample code: List the available Deployment stack what-if results at resource group scope. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void listTheAvailableDeploymentStackWhatIfResultsAtResourceGroupScope( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtResourceGroups() + .listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupWhatIfSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupWhatIfSamples.java new file mode 100644 index 000000000000..459e6c7685bc --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupWhatIfSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +/** + * Samples for DeploymentStacksWhatIfResultsAtResourceGroup WhatIf. + */ +public final class DeploymentStacksWhatIfResultsAtResourceGroupWhatIfSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsResourceGroupWhatIf.json + */ + /** + * Sample code: Get a detailed resource group Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void getADetailedResourceGroupDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtResourceGroups() + .whatIf("myResourceGroup", "changedDeploymentStackWhatIfResult", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionCreateOrUpdateSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionCreateOrUpdateSamples.java new file mode 100644 index 000000000000..c36854163975 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionCreateOrUpdateSamples.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; +import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DeploymentStacksWhatIfResultsAtSubscription CreateOrUpdate. + */ +public final class DeploymentStacksWhatIfResultsAtSubscriptionCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsSubscriptionCreate.json + */ + /** + * Sample code: Create or update a subscription-scoped Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void createOrUpdateASubscriptionScopedDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtSubscriptions() + .createOrUpdate("simpleDeploymentStackWhatIfResult", + new DeploymentStacksWhatIfResultInner() + .withProperties(new DeploymentStacksWhatIfResultProperties() + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf()) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", + new DeploymentExtensionConfigItem() + .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), + "configOne", + new DeploymentExtensionConfigItem().withValue( + BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) + .withActionOnUnmanage(new ActionOnUnmanage() + .withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings( + new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) + .withDeploymentStackResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") + .withRetentionInterval(Duration.parse("P7D"))) + .withLocation("eastus"), + 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/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionDeleteSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionDeleteSamples.java new file mode 100644 index 000000000000..d90bf50c2f81 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +/** + * Samples for DeploymentStacksWhatIfResultsAtSubscription Delete. + */ +public final class DeploymentStacksWhatIfResultsAtSubscriptionDeleteSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsSubscriptionDelete.json + */ + /** + * Sample code: Delete a subscription Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void deleteASubscriptionDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtSubscriptions() + .deleteWithResponse("simpleDeploymentStack", null, null, null, null, null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionGetSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionGetSamples.java new file mode 100644 index 000000000000..f129c0732033 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +/** + * Samples for DeploymentStacksWhatIfResultsAtSubscription Get. + */ +public final class DeploymentStacksWhatIfResultsAtSubscriptionGetSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsSubscriptionGet.json + */ + /** + * Sample code: Get a subscription Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void getASubscriptionDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtSubscriptions() + .getWithResponse("simpleDeploymentStackWhatIfResult", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionListSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionListSamples.java new file mode 100644 index 000000000000..1337e0788ca7 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +/** + * Samples for DeploymentStacksWhatIfResultsAtSubscription List. + */ +public final class DeploymentStacksWhatIfResultsAtSubscriptionListSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsSubscriptionList.json + */ + /** + * Sample code: List the available Deployment stack what-if results at subscription scope. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void listTheAvailableDeploymentStackWhatIfResultsAtSubscriptionScope( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtSubscriptions().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionWhatIfSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionWhatIfSamples.java new file mode 100644 index 000000000000..421f0262d5d0 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionWhatIfSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +/** + * Samples for DeploymentStacksWhatIfResultsAtSubscription WhatIf. + */ +public final class DeploymentStacksWhatIfResultsAtSubscriptionWhatIfSamples { + /* + * x-ms-original-file: 2025-07-01/DeploymentStackWhatIfResultsSubscriptionWhatIf.json + */ + /** + * Sample code: Get a detailed subscription Deployment stack what-if result. + * + * @param manager Entry point to DeploymentStacksManager. + */ + public static void getADetailedSubscriptionDeploymentStackWhatIfResult( + com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { + manager.deploymentStacksWhatIfResultsAtSubscriptions() + .whatIf("changedDeploymentStackWhatIfResult", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ActionOnUnmanageTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ActionOnUnmanageTests.java new file mode 100644 index 000000000000..7fd18036a712 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ActionOnUnmanageTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; +import org.junit.jupiter.api.Assertions; + +public final class ActionOnUnmanageTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActionOnUnmanage model = BinaryData.fromString( + "{\"resources\":\"detach\",\"resourceGroups\":\"detach\",\"managementGroups\":\"delete\",\"resourcesWithoutDeleteSupport\":\"detach\"}") + .toObject(ActionOnUnmanage.class); + Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DETACH, model.resources()); + Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DETACH, model.resourceGroups()); + Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DELETE, model.managementGroups()); + Assertions.assertEquals(DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH, + model.resourcesWithoutDeleteSupport()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ActionOnUnmanage model = new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DETACH) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DETACH) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourcesWithoutDeleteSupport(DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH); + model = BinaryData.fromObject(model).toObject(ActionOnUnmanage.class); + Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DETACH, model.resources()); + Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DETACH, model.resourceGroups()); + Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DELETE, model.managementGroups()); + Assertions.assertEquals(DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH, + model.resourcesWithoutDeleteSupport()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DenySettingsTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DenySettingsTests.java new file mode 100644 index 000000000000..71b79a2ee0e7 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DenySettingsTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DenySettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DenySettings model = BinaryData.fromString( + "{\"mode\":\"denyDelete\",\"excludedPrincipals\":[\"pewnw\",\"eitjz\",\"flusarhmof\",\"qhsmyurkdtml\"],\"excludedActions\":[\"kuksjtxukcdm\",\"arcryuanzwuxzdxt\"],\"applyToChildScopes\":false}") + .toObject(DenySettings.class); + Assertions.assertEquals(DenySettingsMode.DENY_DELETE, model.mode()); + Assertions.assertEquals("pewnw", model.excludedPrincipals().get(0)); + Assertions.assertEquals("kuksjtxukcdm", model.excludedActions().get(0)); + Assertions.assertFalse(model.applyToChildScopes()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DenySettings model = new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("pewnw", "eitjz", "flusarhmof", "qhsmyurkdtml")) + .withExcludedActions(Arrays.asList("kuksjtxukcdm", "arcryuanzwuxzdxt")) + .withApplyToChildScopes(false); + model = BinaryData.fromObject(model).toObject(DenySettings.class); + Assertions.assertEquals(DenySettingsMode.DENY_DELETE, model.mode()); + Assertions.assertEquals("pewnw", model.excludedPrincipals().get(0)); + Assertions.assertEquals("kuksjtxukcdm", model.excludedActions().get(0)); + Assertions.assertFalse(model.applyToChildScopes()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputDefinitionTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputDefinitionTests.java new file mode 100644 index 000000000000..26522e11fbd3 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputDefinitionTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInputDefinition; +import org.junit.jupiter.api.Assertions; + +public final class DeploymentExternalInputDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentExternalInputDefinition model + = BinaryData.fromString("{\"kind\":\"ucmpoyfd\"}").toObject(DeploymentExternalInputDefinition.class); + Assertions.assertEquals("ucmpoyfd", model.kind()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DeploymentExternalInputDefinition model = new DeploymentExternalInputDefinition().withKind("ucmpoyfd"); + model = BinaryData.fromObject(model).toObject(DeploymentExternalInputDefinition.class); + Assertions.assertEquals("ucmpoyfd", model.kind()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputTests.java new file mode 100644 index 000000000000..c9225c0122ad --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInput; + +public final class DeploymentExternalInputTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentExternalInput model = BinaryData.fromString("{}").toObject(DeploymentExternalInput.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DeploymentExternalInput model = new DeploymentExternalInput(); + model = BinaryData.fromObject(model).toObject(DeploymentExternalInput.class); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStackTemplateDefinitionInnerTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStackTemplateDefinitionInnerTests.java new file mode 100644 index 000000000000..de5afa2f4e86 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStackTemplateDefinitionInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackTemplateDefinitionInner; +import org.junit.jupiter.api.Assertions; + +public final class DeploymentStackTemplateDefinitionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentStackTemplateDefinitionInner model = BinaryData.fromString( + "{\"template\":{},\"templateLink\":{\"uri\":\"g\",\"id\":\"dxyt\",\"relativePath\":\"oyrxvwfudwpzntxh\",\"queryString\":\"hl\",\"contentVersion\":\"jbhckfrlhr\"}}") + .toObject(DeploymentStackTemplateDefinitionInner.class); + Assertions.assertEquals("g", model.templateLink().uri()); + Assertions.assertEquals("dxyt", model.templateLink().id()); + Assertions.assertEquals("oyrxvwfudwpzntxh", model.templateLink().relativePath()); + Assertions.assertEquals("hl", model.templateLink().queryString()); + Assertions.assertEquals("jbhckfrlhr", model.templateLink().contentVersion()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseDenyStatusModeTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseDenyStatusModeTests.java new file mode 100644 index 000000000000..dd839781416f --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseDenyStatusModeTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenyStatusMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBaseDenyStatusMode; +import org.junit.jupiter.api.Assertions; + +public final class DeploymentStacksChangeBaseDenyStatusModeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentStacksChangeBaseDenyStatusMode model + = BinaryData.fromString("{\"before\":\"denyDelete\",\"after\":\"none\"}") + .toObject(DeploymentStacksChangeBaseDenyStatusMode.class); + Assertions.assertEquals(DenyStatusMode.DENY_DELETE, model.before()); + Assertions.assertEquals(DenyStatusMode.NONE, model.after()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseDeploymentStacksManagementStatusTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseDeploymentStacksManagementStatusTests.java new file mode 100644 index 000000000000..55dd924f2a78 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseDeploymentStacksManagementStatusTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBaseDeploymentStacksManagementStatus; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksManagementStatus; +import org.junit.jupiter.api.Assertions; + +public final class DeploymentStacksChangeBaseDeploymentStacksManagementStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentStacksChangeBaseDeploymentStacksManagementStatus model + = BinaryData.fromString("{\"before\":\"unmanaged\",\"after\":\"managed\"}") + .toObject(DeploymentStacksChangeBaseDeploymentStacksManagementStatus.class); + Assertions.assertEquals(DeploymentStacksManagementStatus.UNMANAGED, model.before()); + Assertions.assertEquals(DeploymentStacksManagementStatus.MANAGED, model.after()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseTests.java new file mode 100644 index 000000000000..0314fba6f392 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBase; +import org.junit.jupiter.api.Assertions; + +public final class DeploymentStacksChangeBaseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentStacksChangeBase model = BinaryData.fromString("{\"before\":\"bfs\",\"after\":\"rbu\"}") + .toObject(DeploymentStacksChangeBase.class); + Assertions.assertEquals("bfs", model.before()); + Assertions.assertEquals("rbu", model.after()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaDenySettingsTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaDenySettingsTests.java new file mode 100644 index 000000000000..48158d4a470c --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaDenySettingsTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeDeltaDenySettings; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfPropertyChangeType; +import org.junit.jupiter.api.Assertions; + +public final class DeploymentStacksChangeDeltaDenySettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentStacksChangeDeltaDenySettings model = BinaryData.fromString( + "{\"before\":{\"mode\":\"denyWriteAndDelete\",\"excludedPrincipals\":[\"ywnuzoq\"],\"excludedActions\":[\"yqzrnkcqvyxlw\",\"zlsico\"],\"applyToChildScopes\":false},\"after\":{\"mode\":\"none\",\"excludedPrincipals\":[\"lryav\",\"hheunmmqhgyx\",\"konocu\",\"oklyaxuconuq\"],\"excludedActions\":[\"kbeype\",\"rmjmwvvjektc\"],\"applyToChildScopes\":false},\"delta\":[{\"path\":\"rsffrzpwvlqdqgbi\",\"changeType\":\"create\",\"children\":[{\"path\":\"aetcktvfcivfs\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"uctqhjfbe\",\"changeType\":\"delete\"}]},{\"path\":\"xerf\",\"changeType\":\"array\",\"children\":[{\"path\":\"ttxfvjr\",\"changeType\":\"array\"},{\"path\":\"rp\",\"changeType\":\"delete\"},{\"path\":\"epcyvahfnlj\",\"changeType\":\"noEffect\"}]},{\"path\":\"j\",\"changeType\":\"create\",\"children\":[{\"path\":\"qgidokgjljyo\",\"changeType\":\"delete\"}]}]},{\"path\":\"ltbgsncghkj\",\"changeType\":\"create\",\"children\":[{\"path\":\"ijhtxf\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"fsm\",\"changeType\":\"modify\"}]},{\"path\":\"mpvecxgodebfqk\",\"changeType\":\"array\",\"children\":[{\"path\":\"pukgriwflzlfb\",\"changeType\":\"delete\"},{\"path\":\"puz\",\"changeType\":\"delete\"}]},{\"path\":\"pnq\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"gkbrpyyd\",\"changeType\":\"delete\"},{\"path\":\"bnuqqkpik\",\"changeType\":\"array\"},{\"path\":\"rgvtqag\",\"changeType\":\"create\"},{\"path\":\"uynhijg\",\"changeType\":\"noEffect\"}]}]}]}") + .toObject(DeploymentStacksChangeDeltaDenySettings.class); + Assertions.assertEquals(DenySettingsMode.DENY_WRITE_AND_DELETE, model.before().mode()); + Assertions.assertEquals("ywnuzoq", model.before().excludedPrincipals().get(0)); + Assertions.assertEquals("yqzrnkcqvyxlw", model.before().excludedActions().get(0)); + Assertions.assertFalse(model.before().applyToChildScopes()); + Assertions.assertEquals(DenySettingsMode.NONE, model.after().mode()); + Assertions.assertEquals("lryav", model.after().excludedPrincipals().get(0)); + Assertions.assertEquals("kbeype", model.after().excludedActions().get(0)); + Assertions.assertFalse(model.after().applyToChildScopes()); + Assertions.assertEquals("rsffrzpwvlqdqgbi", model.delta().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.CREATE, model.delta().get(0).changeType()); + Assertions.assertEquals("aetcktvfcivfs", model.delta().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.NO_EFFECT, + model.delta().get(0).children().get(0).changeType()); + Assertions.assertEquals("uctqhjfbe", model.delta().get(0).children().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, + model.delta().get(0).children().get(0).children().get(0).changeType()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaRecordTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaRecordTests.java new file mode 100644 index 000000000000..a3383228e673 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaRecordTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeDeltaRecord; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfPropertyChangeType; +import org.junit.jupiter.api.Assertions; + +public final class DeploymentStacksChangeDeltaRecordTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentStacksChangeDeltaRecord model = BinaryData.fromString( + "{\"before\":{},\"after\":{},\"delta\":[{\"path\":\"ywgndrv\",\"changeType\":\"delete\",\"children\":[{\"path\":\"phrcgyncoc\",\"changeType\":\"delete\",\"children\":[{\"path\":\"vmmcoofs\",\"changeType\":\"noEffect\"}]},{\"path\":\"v\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"jqabcypmivkwlzuv\",\"changeType\":\"noEffect\"},{\"path\":\"fwnfnb\",\"changeType\":\"modify\"},{\"path\":\"fionl\",\"changeType\":\"array\"},{\"path\":\"x\",\"changeType\":\"modify\"}]},{\"path\":\"tzxdpnqbqqwx\",\"changeType\":\"delete\",\"children\":[{\"path\":\"al\",\"changeType\":\"noEffect\"},{\"path\":\"wsubisnja\",\"changeType\":\"delete\"},{\"path\":\"mngnzscxaqw\",\"changeType\":\"create\"},{\"path\":\"chcbonqvpkvlrxnj\",\"changeType\":\"array\"}]},{\"path\":\"ipheoflokeyyien\",\"changeType\":\"create\",\"children\":[{\"path\":\"wtgrhpdjpj\",\"changeType\":\"noEffect\"},{\"path\":\"asxazjpqyegualhb\",\"changeType\":\"array\"},{\"path\":\"hejjz\",\"changeType\":\"modify\"}]}]},{\"path\":\"dgwdslfhot\",\"changeType\":\"modify\",\"children\":[{\"path\":\"wlbjnpgacftade\",\"changeType\":\"array\",\"children\":[{\"path\":\"tyfsoppusuesn\",\"changeType\":\"delete\"},{\"path\":\"dejbavo\",\"changeType\":\"noEffect\"}]},{\"path\":\"mohctb\",\"changeType\":\"array\",\"children\":[{\"path\":\"wxdndnvowgujjug\",\"changeType\":\"delete\"},{\"path\":\"kcglhslaz\",\"changeType\":\"modify\"}]}]}]}") + .toObject(DeploymentStacksChangeDeltaRecord.class); + Assertions.assertEquals("ywgndrv", model.delta().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, model.delta().get(0).changeType()); + Assertions.assertEquals("phrcgyncoc", model.delta().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, + model.delta().get(0).children().get(0).changeType()); + Assertions.assertEquals("vmmcoofs", model.delta().get(0).children().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.NO_EFFECT, + model.delta().get(0).children().get(0).children().get(0).changeType()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDebugSettingTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDebugSettingTests.java new file mode 100644 index 000000000000..ea41bc9d5b32 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDebugSettingTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDebugSetting; +import org.junit.jupiter.api.Assertions; + +public final class DeploymentStacksDebugSettingTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentStacksDebugSetting model + = BinaryData.fromString("{\"detailLevel\":\"fjddeqs\"}").toObject(DeploymentStacksDebugSetting.class); + Assertions.assertEquals("fjddeqs", model.detailLevel()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DeploymentStacksDebugSetting model = new DeploymentStacksDebugSetting().withDetailLevel("fjddeqs"); + model = BinaryData.fromObject(model).toObject(DeploymentStacksDebugSetting.class); + Assertions.assertEquals("fjddeqs", model.detailLevel()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtManagementGroupMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtManagementGroupMockTests.java index d44e71c7fe47..cab561eca161 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtManagementGroupMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtManagementGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -10,9 +10,8 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionManagementGroupMode; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionResourceGroupMode; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionResourceMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; @@ -31,9 +30,9 @@ public void testDeleteAtManagementGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.deploymentStacks() - .deleteAtManagementGroup("vvdfwatkpnpul", "xxbczwtr", UnmanageActionResourceMode.DETACH, - UnmanageActionResourceGroupMode.DELETE, UnmanageActionManagementGroupMode.DETACH, false, - com.azure.core.util.Context.NONE); + .deleteAtManagementGroup("bkrvrnsvshqj", "hxcr", DeploymentStacksDeleteDetachEnum.DETACH, + DeploymentStacksDeleteDetachEnum.DELETE, DeploymentStacksDeleteDetachEnum.DETACH, + DeploymentStacksResourcesWithoutDeleteSupportEnum.FAIL, false, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtSubscriptionMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtSubscriptionMockTests.java index 16e99a01973b..c6eb000385ea 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtSubscriptionMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtSubscriptionMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -10,9 +10,8 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionManagementGroupMode; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionResourceGroupMode; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionResourceMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; @@ -31,8 +30,9 @@ public void testDeleteAtSubscription() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.deploymentStacks() - .deleteAtSubscription("jumasx", UnmanageActionResourceMode.DELETE, UnmanageActionResourceGroupMode.DELETE, - UnmanageActionManagementGroupMode.DETACH, false, com.azure.core.util.Context.NONE); + .deleteAtSubscription("pigvpgylgqgitx", DeploymentStacksDeleteDetachEnum.DETACH, + DeploymentStacksDeleteDetachEnum.DELETE, DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH, false, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteMockTests.java index 05fcc942cce3..46142bd0adbb 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -10,9 +10,8 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionManagementGroupMode; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionResourceGroupMode; -import com.azure.resourcemanager.resources.deploymentstacks.models.UnmanageActionResourceMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; @@ -31,9 +30,9 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.deploymentStacks() - .delete("btwnpzaoqvuhrhcf", "cyddglmjthjqk", UnmanageActionResourceMode.DELETE, - UnmanageActionResourceGroupMode.DETACH, UnmanageActionManagementGroupMode.DETACH, false, - com.azure.core.util.Context.NONE); + .delete("vzunluthnnprnxi", "eilpjzuaejxdu", DeploymentStacksDeleteDetachEnum.DETACH, + DeploymentStacksDeleteDetachEnum.DELETE, DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksResourcesWithoutDeleteSupportEnum.FAIL, true, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtManagementGroupWithResponseMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtManagementGroupWithResponseMockTests.java index 94c207544d28..da7008061fe1 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtManagementGroupWithResponseMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtManagementGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -21,7 +21,7 @@ public final class DeploymentStacksExportTemplateAtManagementGroupWithResponseMo @Test public void testExportTemplateAtManagementGroupWithResponse() throws Exception { String responseStr - = "{\"template\":\"dataur\",\"templateLink\":{\"uri\":\"xjnspy\",\"id\":\"tko\",\"relativePath\":\"kouknvudwtiu\",\"queryString\":\"ldngkpoci\",\"contentVersion\":\"z\"}}"; + = "{\"template\":{},\"templateLink\":{\"uri\":\"rfbjf\",\"id\":\"w\",\"relativePath\":\"otftpvjzbexilz\",\"queryString\":\"fqqnvwpmqtaruo\",\"contentVersion\":\"mkcjhwqytjrybn\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testExportTemplateAtManagementGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeploymentStackTemplateDefinition response = manager.deploymentStacks() - .exportTemplateAtManagementGroupWithResponse("vmezy", "shxmzsbbzoggigrx", com.azure.core.util.Context.NONE) + .exportTemplateAtManagementGroupWithResponse("srruvwbhsqfsubcg", "birx", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xjnspy", response.templateLink().uri()); - Assertions.assertEquals("tko", response.templateLink().id()); - Assertions.assertEquals("kouknvudwtiu", response.templateLink().relativePath()); - Assertions.assertEquals("ldngkpoci", response.templateLink().queryString()); - Assertions.assertEquals("z", response.templateLink().contentVersion()); + Assertions.assertEquals("rfbjf", response.templateLink().uri()); + Assertions.assertEquals("w", response.templateLink().id()); + Assertions.assertEquals("otftpvjzbexilz", response.templateLink().relativePath()); + Assertions.assertEquals("fqqnvwpmqtaruo", response.templateLink().queryString()); + Assertions.assertEquals("mkcjhwqytjrybn", response.templateLink().contentVersion()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtResourceGroupWithResponseMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtResourceGroupWithResponseMockTests.java index ace6b319967d..c70c48664828 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtResourceGroupWithResponseMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -21,7 +21,7 @@ public final class DeploymentStacksExportTemplateAtResourceGroupWithResponseMock @Test public void testExportTemplateAtResourceGroupWithResponse() throws Exception { String responseStr - = "{\"template\":\"datakwlhzdo\",\"templateLink\":{\"uri\":\"jmflbvvnch\",\"id\":\"cciw\",\"relativePath\":\"juqk\",\"queryString\":\"sa\",\"contentVersion\":\"wkuofoskghsauu\"}}"; + = "{\"template\":{},\"templateLink\":{\"uri\":\"ofd\",\"id\":\"uusdttouwa\",\"relativePath\":\"ekqvkeln\",\"queryString\":\"vbxwyjsflhh\",\"contentVersion\":\"aln\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testExportTemplateAtResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeploymentStackTemplateDefinition response = manager.deploymentStacks() - .exportTemplateAtResourceGroupWithResponse("bq", "vsovmyokac", com.azure.core.util.Context.NONE) + .exportTemplateAtResourceGroupWithResponse("btdzumveekg", "wozuhkf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jmflbvvnch", response.templateLink().uri()); - Assertions.assertEquals("cciw", response.templateLink().id()); - Assertions.assertEquals("juqk", response.templateLink().relativePath()); - Assertions.assertEquals("sa", response.templateLink().queryString()); - Assertions.assertEquals("wkuofoskghsauu", response.templateLink().contentVersion()); + Assertions.assertEquals("ofd", response.templateLink().uri()); + Assertions.assertEquals("uusdttouwa", response.templateLink().id()); + Assertions.assertEquals("ekqvkeln", response.templateLink().relativePath()); + Assertions.assertEquals("vbxwyjsflhh", response.templateLink().queryString()); + Assertions.assertEquals("aln", response.templateLink().contentVersion()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtSubscriptionWithResponseMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtSubscriptionWithResponseMockTests.java index 8e52ef4a1c0b..441c7f51bd63 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtSubscriptionWithResponseMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtSubscriptionWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resources.deploymentstacks.generated; @@ -21,7 +21,7 @@ public final class DeploymentStacksExportTemplateAtSubscriptionWithResponseMockT @Test public void testExportTemplateAtSubscriptionWithResponse() throws Exception { String responseStr - = "{\"template\":\"databyao\",\"templateLink\":{\"uri\":\"xc\",\"id\":\"npc\",\"relativePath\":\"ocohslkevleg\",\"queryString\":\"fbuhfmvfaxkffe\",\"contentVersion\":\"th\"}}"; + = "{\"template\":{},\"templateLink\":{\"uri\":\"gktrmgucnapkte\",\"id\":\"llwptfdy\",\"relativePath\":\"fqbuaceopzf\",\"queryString\":\"hhuao\",\"contentVersion\":\"pcqeqx\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testExportTemplateAtSubscriptionWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeploymentStackTemplateDefinition response = manager.deploymentStacks() - .exportTemplateAtSubscriptionWithResponse("mjmvxieduugidyjr", com.azure.core.util.Context.NONE) + .exportTemplateAtSubscriptionWithResponse("slynqwwnc", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xc", response.templateLink().uri()); - Assertions.assertEquals("npc", response.templateLink().id()); - Assertions.assertEquals("ocohslkevleg", response.templateLink().relativePath()); - Assertions.assertEquals("fbuhfmvfaxkffe", response.templateLink().queryString()); - Assertions.assertEquals("th", response.templateLink().contentVersion()); + Assertions.assertEquals("gktrmgucnapkte", response.templateLink().uri()); + Assertions.assertEquals("llwptfdy", response.templateLink().id()); + Assertions.assertEquals("fqbuaceopzf", response.templateLink().relativePath()); + Assertions.assertEquals("hhuao", response.templateLink().queryString()); + Assertions.assertEquals("pcqeqx", response.templateLink().contentVersion()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksParametersLinkTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksParametersLinkTests.java new file mode 100644 index 000000000000..044aff808bc8 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksParametersLinkTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksParametersLink; +import org.junit.jupiter.api.Assertions; + +public final class DeploymentStacksParametersLinkTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentStacksParametersLink model + = BinaryData.fromString("{\"uri\":\"qgn\",\"contentVersion\":\"ooojywifsqe\"}") + .toObject(DeploymentStacksParametersLink.class); + Assertions.assertEquals("qgn", model.uri()); + Assertions.assertEquals("ooojywifsqe", model.contentVersion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DeploymentStacksParametersLink model + = new DeploymentStacksParametersLink().withUri("qgn").withContentVersion("ooojywifsqe"); + model = BinaryData.fromObject(model).toObject(DeploymentStacksParametersLink.class); + Assertions.assertEquals("qgn", model.uri()); + Assertions.assertEquals("ooojywifsqe", model.contentVersion()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksTemplateLinkTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksTemplateLinkTests.java new file mode 100644 index 000000000000..0266d6b694f9 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksTemplateLinkTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; +import org.junit.jupiter.api.Assertions; + +public final class DeploymentStacksTemplateLinkTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentStacksTemplateLink model = BinaryData.fromString( + "{\"uri\":\"dxbmtqioq\",\"id\":\"ehtbm\",\"relativePath\":\"p\",\"queryString\":\"noi\",\"contentVersion\":\"wlrxyb\"}") + .toObject(DeploymentStacksTemplateLink.class); + Assertions.assertEquals("dxbmtqioq", model.uri()); + Assertions.assertEquals("ehtbm", model.id()); + Assertions.assertEquals("p", model.relativePath()); + Assertions.assertEquals("noi", model.queryString()); + Assertions.assertEquals("wlrxyb", model.contentVersion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DeploymentStacksTemplateLink model = new DeploymentStacksTemplateLink().withUri("dxbmtqioq") + .withId("ehtbm") + .withRelativePath("p") + .withQueryString("noi") + .withContentVersion("wlrxyb"); + model = BinaryData.fromObject(model).toObject(DeploymentStacksTemplateLink.class); + Assertions.assertEquals("dxbmtqioq", model.uri()); + Assertions.assertEquals("ehtbm", model.id()); + Assertions.assertEquals("p", model.relativePath()); + Assertions.assertEquals("noi", model.queryString()); + Assertions.assertEquals("wlrxyb", model.contentVersion()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfChangeTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfChangeTests.java new file mode 100644 index 000000000000..aa061cbd2a5f --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfChangeTests.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DenyStatusMode; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksManagementStatus; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChange; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChangeCertainty; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChangeType; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfPropertyChangeType; +import org.junit.jupiter.api.Assertions; + +public final class DeploymentStacksWhatIfChangeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentStacksWhatIfChange model = BinaryData.fromString( + "{\"resourceChanges\":[{\"id\":\"m\",\"extension\":{\"name\":\"fp\",\"version\":\"rqobmtuk\",\"configId\":\"ryrtihfxtijbpzv\",\"config\":{\"symglzufcyz\":{},\"ohdbihanufh\":{},\"cbjy\":{},\"a\":{}}},\"type\":\"th\",\"identifiers\":{},\"apiVersion\":\"bifpikxwczb\",\"deploymentId\":\"cnpqxuhivyqniwby\",\"symbolicName\":\"k\",\"changeType\":\"delete\",\"changeCertainty\":\"potential\",\"managementStatusChange\":{\"before\":\"managed\",\"after\":\"unmanaged\"},\"denyStatusChange\":{\"before\":\"unknown\",\"after\":\"denyWriteAndDelete\"},\"unsupportedReason\":\"xgaudccs\",\"resourceConfigurationChanges\":{\"before\":{},\"after\":{},\"delta\":[{\"path\":\"kryhtnapczwlokj\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"kvnipjoxz\",\"changeType\":\"delete\"},{\"path\":\"chgejspodm\",\"changeType\":\"create\"},{\"path\":\"lzydehojwyahux\",\"changeType\":\"delete\"}]},{\"path\":\"qnjaqwix\",\"changeType\":\"delete\",\"children\":[{\"path\":\"ozvcput\",\"changeType\":\"array\"}]}]}},{\"id\":\"vwmf\",\"extension\":{\"name\":\"t\",\"version\":\"cmdv\",\"configId\":\"hulsuuvmkjozkrwf\",\"config\":{\"djpslw\":{},\"jdpvwryo\":{},\"psoacctazakljl\":{}}},\"type\":\"bcryffdfd\",\"identifiers\":{},\"apiVersion\":\"expa\",\"deploymentId\":\"akhmsbzjhcrz\",\"symbolicName\":\"dphlxaolt\",\"changeType\":\"delete\",\"changeCertainty\":\"definite\",\"managementStatusChange\":{\"before\":\"managed\",\"after\":\"unmanaged\"},\"denyStatusChange\":{\"before\":\"denyWriteAndDelete\",\"after\":\"inapplicable\"},\"unsupportedReason\":\"n\",\"resourceConfigurationChanges\":{\"before\":{},\"after\":{},\"delta\":[{\"path\":\"xxjtfe\",\"changeType\":\"delete\",\"children\":[{\"path\":\"fziton\",\"changeType\":\"delete\"},{\"path\":\"qfpjk\",\"changeType\":\"create\"},{\"path\":\"xofpdvhpfxxypi\",\"changeType\":\"array\"},{\"path\":\"nmayhuybb\",\"changeType\":\"create\"}]}]}},{\"id\":\"depoog\",\"extension\":{\"name\":\"uvamiheognarxzxt\",\"version\":\"eotusivyevc\",\"configId\":\"qi\",\"config\":{\"ngbwjz\":{}}},\"type\":\"fygxgispemvtzfk\",\"identifiers\":{},\"apiVersion\":\"ljofxqeofjaeqjh\",\"deploymentId\":\"b\",\"symbolicName\":\"v\",\"changeType\":\"create\",\"changeCertainty\":\"potential\",\"managementStatusChange\":{\"before\":\"managed\",\"after\":\"unmanaged\"},\"denyStatusChange\":{\"before\":\"inapplicable\",\"after\":\"removedBySystem\"},\"unsupportedReason\":\"ybkzgcwr\",\"resourceConfigurationChanges\":{\"before\":{},\"after\":{},\"delta\":[{\"path\":\"ouskcqvkocrc\",\"changeType\":\"create\",\"children\":[{\"path\":\"tnhxbn\",\"changeType\":\"array\"},{\"path\":\"iksqr\",\"changeType\":\"delete\"},{\"path\":\"ssainqpjwnzll\",\"changeType\":\"modify\"},{\"path\":\"mppeebvmgxs\",\"changeType\":\"noEffect\"}]},{\"path\":\"qduujitcjczdz\",\"changeType\":\"delete\",\"children\":[{\"path\":\"hkr\",\"changeType\":\"array\"},{\"path\":\"d\",\"changeType\":\"array\"},{\"path\":\"p\",\"changeType\":\"noEffect\"},{\"path\":\"bdkvwrwjf\",\"changeType\":\"modify\"}]}]}},{\"id\":\"nhutjeltmrldhugj\",\"extension\":{\"name\":\"datqxhocdgeabl\",\"version\":\"phut\",\"configId\":\"ndv\",\"config\":{\"wyiftyhxhur\":{},\"k\":{},\"tyxolniwpwc\":{}}},\"type\":\"jfkgiawxk\",\"identifiers\":{},\"apiVersion\":\"lwckbasyypnddhs\",\"deploymentId\":\"bacphejko\",\"symbolicName\":\"nqgoulzndli\",\"changeType\":\"create\",\"changeCertainty\":\"definite\",\"managementStatusChange\":{\"before\":\"managed\",\"after\":\"managed\"},\"denyStatusChange\":{\"before\":\"denyWriteAndDelete\",\"after\":\"notSupported\"},\"unsupportedReason\":\"akeqs\",\"resourceConfigurationChanges\":{\"before\":{},\"after\":{},\"delta\":[{\"path\":\"ytb\",\"changeType\":\"array\",\"children\":[{\"path\":\"ouf\",\"changeType\":\"array\"},{\"path\":\"mnkzsmod\",\"changeType\":\"array\"},{\"path\":\"lougpbkw\",\"changeType\":\"array\"},{\"path\":\"utduqktapspwgcu\",\"changeType\":\"modify\"}]}]}}],\"denySettingsChange\":{\"before\":{\"mode\":\"none\",\"excludedPrincipals\":[\"dosvqwhbmdgbbjf\",\"dgmb\"],\"excludedActions\":[\"xppbhtqqro\"],\"applyToChildScopes\":false},\"after\":{\"mode\":\"denyWriteAndDelete\",\"excludedPrincipals\":[\"lgbquxig\",\"yjgzjaoyfhrtxiln\",\"rkujy\",\"vlejuvfqa\"],\"excludedActions\":[\"yxwjkcp\",\"bnwbxgjvtbvpyssz\",\"nruj\",\"guhmuouqfpr\"],\"applyToChildScopes\":true},\"delta\":[{\"path\":\"itnwuizgazxufi\",\"changeType\":\"create\",\"children\":[{\"path\":\"i\",\"changeType\":\"create\",\"children\":[{\"path\":\"dfvzwdzuhty\",\"changeType\":\"array\"}]}]},{\"path\":\"dkfthwxmnt\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"vkmijcmmxdcuf\",\"changeType\":\"create\",\"children\":[{\"path\":\"pymzidnsezcxtbzs\",\"changeType\":\"noEffect\"},{\"path\":\"yc\",\"changeType\":\"modify\"},{\"path\":\"newmdwzjeiachbo\",\"changeType\":\"create\"}]}]},{\"path\":\"nrosfqpte\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"pyqr\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"npvswjdkirso\",\"changeType\":\"noEffect\"},{\"path\":\"qxhcrmn\",\"changeType\":\"modify\"},{\"path\":\"jtckwhdso\",\"changeType\":\"create\"},{\"path\":\"iy\",\"changeType\":\"noEffect\"}]},{\"path\":\"sqwpgrjb\",\"changeType\":\"modify\",\"children\":[{\"path\":\"cjxvsnbyxqab\",\"changeType\":\"delete\"},{\"path\":\"ocpcy\",\"changeType\":\"delete\"},{\"path\":\"urzafb\",\"changeType\":\"noEffect\"},{\"path\":\"j\",\"changeType\":\"delete\"}]},{\"path\":\"oq\",\"changeType\":\"delete\",\"children\":[{\"path\":\"ljavbqid\",\"changeType\":\"modify\"}]},{\"path\":\"zyulp\",\"changeType\":\"modify\",\"children\":[{\"path\":\"krlkhbzhfepg\",\"changeType\":\"delete\"},{\"path\":\"qex\",\"changeType\":\"array\"},{\"path\":\"ocxscpaierhhbcs\",\"changeType\":\"create\"},{\"path\":\"ummajtjaod\",\"changeType\":\"array\"}]}]},{\"path\":\"bdxkqpxokaj\",\"changeType\":\"create\",\"children\":[{\"path\":\"ex\",\"changeType\":\"create\",\"children\":[{\"path\":\"gcpo\",\"changeType\":\"array\"}]},{\"path\":\"ajrmvdjwzrlovmc\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"j\",\"changeType\":\"delete\"},{\"path\":\"ejctbzaqsqsycb\",\"changeType\":\"modify\"},{\"path\":\"fkgukdkexxppof\",\"changeType\":\"delete\"}]},{\"path\":\"c\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"ddtocjjxhvp\",\"changeType\":\"create\"},{\"path\":\"uexhdzx\",\"changeType\":\"modify\"}]},{\"path\":\"ojnxqbzvdd\",\"changeType\":\"array\",\"children\":[{\"path\":\"deicbtwnpzao\",\"changeType\":\"modify\"}]}]}]},\"deploymentScopeChange\":{\"before\":\"rhcffcydd\",\"after\":\"mjthjqkwp\"}}") + .toObject(DeploymentStacksWhatIfChange.class); + Assertions.assertEquals("cnpqxuhivyqniwby", model.resourceChanges().get(0).deploymentId()); + Assertions.assertEquals("k", model.resourceChanges().get(0).symbolicName()); + Assertions.assertEquals(DeploymentStacksWhatIfChangeType.DELETE, model.resourceChanges().get(0).changeType()); + Assertions.assertEquals(DeploymentStacksWhatIfChangeCertainty.POTENTIAL, + model.resourceChanges().get(0).changeCertainty()); + Assertions.assertEquals(DeploymentStacksManagementStatus.MANAGED, + model.resourceChanges().get(0).managementStatusChange().before()); + Assertions.assertEquals(DeploymentStacksManagementStatus.UNMANAGED, + model.resourceChanges().get(0).managementStatusChange().after()); + Assertions.assertEquals(DenyStatusMode.UNKNOWN, model.resourceChanges().get(0).denyStatusChange().before()); + Assertions.assertEquals(DenyStatusMode.DENY_WRITE_AND_DELETE, + model.resourceChanges().get(0).denyStatusChange().after()); + Assertions.assertEquals("xgaudccs", model.resourceChanges().get(0).unsupportedReason()); + Assertions.assertEquals("kryhtnapczwlokj", + model.resourceChanges().get(0).resourceConfigurationChanges().delta().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.NO_EFFECT, + model.resourceChanges().get(0).resourceConfigurationChanges().delta().get(0).changeType()); + Assertions.assertEquals("kvnipjoxz", + model.resourceChanges().get(0).resourceConfigurationChanges().delta().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, + model.resourceChanges() + .get(0) + .resourceConfigurationChanges() + .delta() + .get(0) + .children() + .get(0) + .changeType()); + Assertions.assertEquals(DenySettingsMode.NONE, model.denySettingsChange().before().mode()); + Assertions.assertEquals("dosvqwhbmdgbbjf", model.denySettingsChange().before().excludedPrincipals().get(0)); + Assertions.assertEquals("xppbhtqqro", model.denySettingsChange().before().excludedActions().get(0)); + Assertions.assertFalse(model.denySettingsChange().before().applyToChildScopes()); + Assertions.assertEquals(DenySettingsMode.DENY_WRITE_AND_DELETE, model.denySettingsChange().after().mode()); + Assertions.assertEquals("lgbquxig", model.denySettingsChange().after().excludedPrincipals().get(0)); + Assertions.assertEquals("yxwjkcp", model.denySettingsChange().after().excludedActions().get(0)); + Assertions.assertTrue(model.denySettingsChange().after().applyToChildScopes()); + Assertions.assertEquals("itnwuizgazxufi", model.denySettingsChange().delta().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.CREATE, + model.denySettingsChange().delta().get(0).changeType()); + Assertions.assertEquals("i", model.denySettingsChange().delta().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.CREATE, + model.denySettingsChange().delta().get(0).children().get(0).changeType()); + Assertions.assertEquals("dfvzwdzuhty", + model.denySettingsChange().delta().get(0).children().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.ARRAY, + model.denySettingsChange().delta().get(0).children().get(0).children().get(0).changeType()); + Assertions.assertEquals("rhcffcydd", model.deploymentScopeChange().before()); + Assertions.assertEquals("mjthjqkwp", model.deploymentScopeChange().after()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfPropertyChangeTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfPropertyChangeTests.java new file mode 100644 index 000000000000..1809f2f386f0 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfPropertyChangeTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfPropertyChange; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfPropertyChangeType; +import org.junit.jupiter.api.Assertions; + +public final class DeploymentStacksWhatIfPropertyChangeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentStacksWhatIfPropertyChange model = BinaryData.fromString( + "{\"path\":\"gdtjixhbkuofqwey\",\"changeType\":\"delete\",\"children\":[{\"path\":\"vfyexfw\",\"changeType\":\"array\",\"children\":[{\"path\":\"vyvdcs\",\"changeType\":\"array\",\"children\":[{\"path\":\"naamde\",\"changeType\":\"array\"},{\"path\":\"eh\",\"changeType\":\"noEffect\"},{\"path\":\"qsc\",\"changeType\":\"delete\"},{\"path\":\"ypvhezrkg\",\"changeType\":\"create\"}]},{\"path\":\"refovgmkqsleyyvx\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"k\",\"changeType\":\"delete\"}]},{\"path\":\"pngjcrcczsqpjhvm\",\"changeType\":\"array\",\"children\":[{\"path\":\"nysounqe\",\"changeType\":\"modify\"}]},{\"path\":\"ae\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"yhltrpmopjmcm\",\"changeType\":\"noEffect\"}]}]},{\"path\":\"kthfui\",\"changeType\":\"create\",\"children\":[{\"path\":\"cpkvxodp\",\"changeType\":\"array\",\"children\":[{\"path\":\"yzydagfuaxbezyi\",\"changeType\":\"modify\"},{\"path\":\"kktwhrdxw\",\"changeType\":\"noEffect\"},{\"path\":\"wqsmbsur\",\"changeType\":\"delete\"},{\"path\":\"imoryocfsfksym\",\"changeType\":\"delete\"}]},{\"path\":\"tki\",\"changeType\":\"create\",\"children\":[{\"path\":\"qyud\",\"changeType\":\"delete\"},{\"path\":\"rrqnbpoczvyifqrv\",\"changeType\":\"array\"},{\"path\":\"vjsllrmvvdfw\",\"changeType\":\"noEffect\"},{\"path\":\"kpnpulexxbczwtr\",\"changeType\":\"noEffect\"}]},{\"path\":\"zb\",\"changeType\":\"create\",\"children\":[{\"path\":\"ovm\",\"changeType\":\"modify\"},{\"path\":\"kacspkw\",\"changeType\":\"noEffect\"},{\"path\":\"zdobpxjmflbvvnch\",\"changeType\":\"array\"},{\"path\":\"cciw\",\"changeType\":\"modify\"}]},{\"path\":\"qkhr\",\"changeType\":\"modify\",\"children\":[{\"path\":\"wkuofoskghsauu\",\"changeType\":\"array\"},{\"path\":\"jmvxie\",\"changeType\":\"delete\"}]}]},{\"path\":\"idyjrrfbyaosvexc\",\"changeType\":\"delete\",\"children\":[{\"path\":\"hocohslkev\",\"changeType\":\"modify\",\"children\":[{\"path\":\"zfbuhf\",\"changeType\":\"array\"}]},{\"path\":\"x\",\"changeType\":\"modify\",\"children\":[{\"path\":\"iith\",\"changeType\":\"noEffect\"},{\"path\":\"m\",\"changeType\":\"delete\"},{\"path\":\"yvshxmz\",\"changeType\":\"array\"}]},{\"path\":\"oggigrxwburv\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"nspydptkoenkoukn\",\"changeType\":\"delete\"},{\"path\":\"dwtiukbldngkp\",\"changeType\":\"delete\"}]}]},{\"path\":\"azyxoegukg\",\"changeType\":\"modify\",\"children\":[{\"path\":\"gygev\",\"changeType\":\"delete\",\"children\":[{\"path\":\"yp\",\"changeType\":\"noEffect\"},{\"path\":\"bpizcdrqjsdpydn\",\"changeType\":\"noEffect\"},{\"path\":\"hxdeoejz\",\"changeType\":\"delete\"},{\"path\":\"w\",\"changeType\":\"modify\"}]},{\"path\":\"ttgzfbis\",\"changeType\":\"modify\",\"children\":[{\"path\":\"hajdeyeamdpha\",\"changeType\":\"noEffect\"}]},{\"path\":\"buxwgip\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"ow\",\"changeType\":\"array\"},{\"path\":\"shwankixzbinje\",\"changeType\":\"delete\"}]}]}]}") + .toObject(DeploymentStacksWhatIfPropertyChange.class); + Assertions.assertEquals("gdtjixhbkuofqwey", model.path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, model.changeType()); + Assertions.assertEquals("vfyexfw", model.children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.ARRAY, model.children().get(0).changeType()); + Assertions.assertEquals("vyvdcs", model.children().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.ARRAY, + model.children().get(0).children().get(0).changeType()); + Assertions.assertEquals("naamde", model.children().get(0).children().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.ARRAY, + model.children().get(0).children().get(0).children().get(0).changeType()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupsDeleteWithResponseMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupsDeleteWithResponseMockTests.java new file mode 100644 index 000000000000..1e6566d604fb --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupsDeleteWithResponseMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class DeploymentStacksWhatIfResultsAtManagementGroupsDeleteWithResponseMockTests { + @Test + public void testDeleteWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + DeploymentStacksManager manager = DeploymentStacksManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.deploymentStacksWhatIfResultsAtManagementGroups() + .deleteWithResponse("c", "wxzvlvqhjkb", DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksDeleteDetachEnum.DETACH, DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH, true, com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupsDeleteWithResponseMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupsDeleteWithResponseMockTests.java new file mode 100644 index 000000000000..0f3c74fd0c56 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupsDeleteWithResponseMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class DeploymentStacksWhatIfResultsAtResourceGroupsDeleteWithResponseMockTests { + @Test + public void testDeleteWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + DeploymentStacksManager manager = DeploymentStacksManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.deploymentStacksWhatIfResultsAtResourceGroups() + .deleteWithResponse("c", "hmdua", DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksDeleteDetachEnum.DELETE, DeploymentStacksDeleteDetachEnum.DETACH, + DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH, true, com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionsDeleteWithResponseMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionsDeleteWithResponseMockTests.java new file mode 100644 index 000000000000..f7dd5d3b8074 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionsDeleteWithResponseMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class DeploymentStacksWhatIfResultsAtSubscriptionsDeleteWithResponseMockTests { + @Test + public void testDeleteWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + DeploymentStacksManager manager = DeploymentStacksManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.deploymentStacksWhatIfResultsAtSubscriptions() + .deleteWithResponse("it", DeploymentStacksDeleteDetachEnum.DETACH, DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksDeleteDetachEnum.DELETE, DeploymentStacksResourcesWithoutDeleteSupportEnum.FAIL, false, + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ErrorAdditionalInfoTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ErrorAdditionalInfoTests.java new file mode 100644 index 000000000000..399b7562e4b3 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ErrorAdditionalInfoTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.ErrorAdditionalInfo; + +public final class ErrorAdditionalInfoTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ErrorAdditionalInfo model + = BinaryData.fromString("{\"type\":\"bejhphoycmsxa\"}").toObject(ErrorAdditionalInfo.class); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/KeyVaultReferenceTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/KeyVaultReferenceTests.java new file mode 100644 index 000000000000..c637507fd6be --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/KeyVaultReferenceTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resources.deploymentstacks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resources.deploymentstacks.models.KeyVaultReference; +import org.junit.jupiter.api.Assertions; + +public final class KeyVaultReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + KeyVaultReference model = BinaryData.fromString("{\"id\":\"qqjnqgl\"}").toObject(KeyVaultReference.class); + Assertions.assertEquals("qqjnqgl", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + KeyVaultReference model = new KeyVaultReference().withId("qqjnqgl"); + model = BinaryData.fromObject(model).toObject(KeyVaultReference.class); + Assertions.assertEquals("qqjnqgl", model.id()); + } +} diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/tsp-location.yaml b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/tsp-location.yaml new file mode 100644 index 000000000000..3c8c37b66158 --- /dev/null +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/resources/resource-manager/Microsoft.Resources/deploymentStacks +commit: 652ad4cb131256f10a90ea2df207b38cf35d6671 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md b/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md index 29ddcf0a5f34..8769a451c730 100644 --- a/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md +++ b/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.54.0-beta.1 (Unreleased) +## 1.1.0 (Unreleased) ### Features Added diff --git a/sdk/resources/azure-resourcemanager-resources/README.md b/sdk/resources/azure-resourcemanager-resources/README.md index 28acacb1e9ad..314ac6bc94a3 100644 --- a/sdk/resources/azure-resourcemanager-resources/README.md +++ b/sdk/resources/azure-resourcemanager-resources/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-resources - 2.53.5 + 2.54.0-beta.1 ``` [//]: # ({x-version-update-end}) From c20162ec2c8317690c449f531e6bb7017240066a Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 28 Jan 2026 09:42:35 +0800 Subject: [PATCH 2/4] revert for script bug --- sdk/resources/azure-resourcemanager-resources/CHANGELOG.md | 2 +- sdk/resources/azure-resourcemanager-resources/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md b/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md index 8769a451c730..29ddcf0a5f34 100644 --- a/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md +++ b/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.1.0 (Unreleased) +## 2.54.0-beta.1 (Unreleased) ### Features Added diff --git a/sdk/resources/azure-resourcemanager-resources/README.md b/sdk/resources/azure-resourcemanager-resources/README.md index 314ac6bc94a3..28acacb1e9ad 100644 --- a/sdk/resources/azure-resourcemanager-resources/README.md +++ b/sdk/resources/azure-resourcemanager-resources/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-resources - 2.54.0-beta.1 + 2.53.5 ``` [//]: # ({x-version-update-end}) From 1d2f3b39cfb99bfa61239e83fed549515aa94575 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 28 Jan 2026 07:06:16 +0000 Subject: [PATCH 3/4] Configurations: 'specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/tspconfig.yaml', API Version: 2025-07-01, SDK Release Type: stable, and CommitSHA: '9762f2dd848f6955a855f5dbe8c4df8f4d5dfd66' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5807045 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../CHANGELOG.md | 227 +++--- .../SAMPLE.md | 277 +++----- .../fluent/models/DeploymentStackInner.java | 515 +------------- ...eploymentStackTemplateDefinitionInner.java | 15 +- .../implementation/DeploymentStackImpl.java | 253 +------ ...DeploymentStackTemplateDefinitionImpl.java | 12 +- .../models/DeploymentExtensionConfigItem.java | 13 +- .../models/DeploymentExternalInput.java | 13 +- .../DeploymentExternalInputDefinition.java | 13 +- .../models/DeploymentParameter.java | 13 +- .../models/DeploymentStack.java | 670 +----------------- .../models/DeploymentStackProperties.java | 41 +- .../DeploymentStackTemplateDefinition.java | 4 +- .../DeploymentStacksChangeDeltaRecord.java | 21 +- .../DeploymentStacksWhatIfPropertyChange.java | 21 +- .../DeploymentStacksWhatIfResourceChange.java | 8 +- ...eploymentStacksWhatIfResultProperties.java | 13 +- .../models/ErrorAdditionalInfo.java | 8 +- .../models/ManagedResourceReference.java | 8 +- .../models/ResourceReference.java | 10 +- .../models/ResourceReferenceExtended.java | 8 +- ...s-deploymentstacks_apiview_properties.json | 2 +- ...r-resources-deploymentstacks_metadata.json | 2 +- ...reateOrUpdateAtManagementGroupSamples.java | 40 +- ...sCreateOrUpdateAtResourceGroupSamples.java | 35 +- ...ksCreateOrUpdateAtSubscriptionSamples.java | 40 +- ...ValidateStackAtManagementGroupSamples.java | 17 +- ...ksValidateStackAtResourceGroupSamples.java | 12 +- ...cksValidateStackAtSubscriptionSamples.java | 17 +- ...tManagementGroupCreateOrUpdateSamples.java | 39 +- ...sAtResourceGroupCreateOrUpdateSamples.java | 38 +- ...tsAtSubscriptionCreateOrUpdateSamples.java | 39 +- .../generated/ActionOnUnmanageTests.java | 20 +- .../generated/DenySettingsTests.java | 26 +- ...eploymentExternalInputDefinitionTests.java | 10 +- .../DeploymentExternalInputTests.java | 5 +- ...mentStackTemplateDefinitionInnerTests.java | 12 +- ...ntStacksChangeBaseDenyStatusModeTests.java | 4 +- .../DeploymentStacksChangeBaseTests.java | 6 +- ...entStacksChangeDeltaDenySettingsTests.java | 28 +- ...eploymentStacksChangeDeltaRecordTests.java | 12 +- .../DeploymentStacksDebugSettingTests.java | 10 +- ...tacksDeleteAtManagementGroupMockTests.java | 6 +- ...ntStacksDeleteAtSubscriptionMockTests.java | 4 +- .../DeploymentStacksDeleteMockTests.java | 6 +- ...tManagementGroupWithResponseMockTests.java | 15 +- ...eAtResourceGroupWithResponseMockTests.java | 14 +- ...teAtSubscriptionWithResponseMockTests.java | 14 +- .../DeploymentStacksParametersLinkTests.java | 12 +- .../DeploymentStacksTemplateLinkTests.java | 32 +- .../DeploymentStacksWhatIfChangeTests.java | 54 +- ...oymentStacksWhatIfPropertyChangeTests.java | 16 +- ...mentGroupsDeleteWithResponseMockTests.java | 6 +- ...urceGroupsDeleteWithResponseMockTests.java | 6 +- ...scriptionsDeleteWithResponseMockTests.java | 6 +- .../generated/ErrorAdditionalInfoTests.java | 4 +- .../generated/KeyVaultReferenceTests.java | 8 +- .../tsp-location.yaml | 2 +- .../CHANGELOG.md | 2 +- .../azure-resourcemanager-resources/README.md | 2 +- 60 files changed, 605 insertions(+), 2181 deletions(-) rename sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/{fluent => }/models/DeploymentStackProperties.java (92%) diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/CHANGELOG.md b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/CHANGELOG.md index c2d233f5f936..6209fba72368 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/CHANGELOG.md +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.1.0 (2026-01-27) +## 1.1.0 (2026-01-28) - Azure Resource Manager Deployment Stacks client library for Java. This package contains Microsoft Azure SDK for Deployment Stacks Management SDK. The APIs listed in this specification can be used to manage Deployment stack resources through the Azure Resource Manager. Package api-version 2025-07-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). @@ -8,34 +8,32 @@ #### `models.UnmanageActionResourceGroupMode` was removed -#### `models.DeploymentStackListResult` was removed - -#### `models.DeploymentStackProperties` was removed - #### `models.UnmanageActionManagementGroupMode` was removed #### `models.AzureResourceBase` was removed +#### `models.DeploymentStackListResult` was removed + #### `models.UnmanageActionResourceMode` was removed +#### `models.DeploymentStackProperties` was modified + +* `validate()` was removed + #### `models.DeploymentStacks` was modified +* `deleteAtSubscription(java.lang.String,models.UnmanageActionResourceMode,models.UnmanageActionResourceGroupMode,models.UnmanageActionManagementGroupMode,java.lang.Boolean,com.azure.core.util.Context)` was removed * `deleteByIdWithResponse(java.lang.String,models.UnmanageActionResourceMode,models.UnmanageActionResourceGroupMode,models.UnmanageActionManagementGroupMode,java.lang.Boolean,com.azure.core.util.Context)` was removed * `delete(java.lang.String,java.lang.String,models.UnmanageActionResourceMode,models.UnmanageActionResourceGroupMode,models.UnmanageActionManagementGroupMode,java.lang.Boolean,com.azure.core.util.Context)` was removed -* `deleteAtSubscription(java.lang.String,models.UnmanageActionResourceMode,models.UnmanageActionResourceGroupMode,models.UnmanageActionManagementGroupMode,java.lang.Boolean,com.azure.core.util.Context)` was removed * `deleteAtManagementGroup(java.lang.String,java.lang.String,models.UnmanageActionResourceMode,models.UnmanageActionResourceGroupMode,models.UnmanageActionManagementGroupMode,java.lang.Boolean,com.azure.core.util.Context)` was removed -#### `models.DeploymentStackTemplateDefinition` was modified - -* `java.lang.Object template()` -> `java.util.Map template()` - -#### `models.DeploymentStack$Definition` was modified +#### `models.ActionOnUnmanage` was modified -* `withProperties(models.DeploymentStackProperties)` was removed +* `validate()` was removed -#### `models.DeploymentStack` was modified +#### `models.DenySettings` was modified -* `properties()` was removed +* `validate()` was removed #### `models.ResourceReferenceExtended` was modified @@ -43,29 +41,6 @@ * `validate()` was removed * `withError(com.azure.core.management.exception.ManagementError)` was removed -#### `models.ManagedResourceReference` was modified - -* `ManagedResourceReference()` was changed to private access -* `validate()` was removed -* `withDenyStatus(models.DenyStatusMode)` was removed -* `withStatus(models.ResourceStatusMode)` was removed - -#### `models.KeyVaultReference` was modified - -* `validate()` was removed - -#### `models.DeploymentStack$Update` was modified - -* `withProperties(models.DeploymentStackProperties)` was removed - -#### `models.ActionOnUnmanage` was modified - -* `validate()` was removed - -#### `models.DenySettings` was modified - -* `validate()` was removed - #### `models.DeploymentStacksTemplateLink` was modified * `validate()` was removed @@ -73,21 +48,19 @@ #### `models.DeploymentStackValidateProperties` was modified * `DeploymentStackValidateProperties()` was changed to private access +* `withCorrelationId(java.lang.String)` was removed +* `validate()` was removed +* `withTemplateLink(models.DeploymentStacksTemplateLink)` was removed * `withValidatedResources(java.util.List)` was removed * `withParameters(java.util.Map)` was removed -* `withTemplateLink(models.DeploymentStacksTemplateLink)` was removed +* `withDescription(java.lang.String)` was removed * `withActionOnUnmanage(models.ActionOnUnmanage)` was removed -* `withCorrelationId(java.lang.String)` was removed -* `validate()` was removed * `withDeploymentScope(java.lang.String)` was removed -* `withDescription(java.lang.String)` was removed * `withDenySettings(models.DenySettings)` was removed #### `models.DeploymentParameter` was modified -* `java.lang.Object value()` -> `com.azure.core.util.BinaryData value()` * `validate()` was removed -* `withValue(java.lang.Object)` was removed #### `models.DeploymentStacksDebugSetting` was modified @@ -97,46 +70,35 @@ * `validate()` was removed -#### `models.ResourceReference` was modified +#### `models.ManagedResourceReference` was modified +* `ManagedResourceReference()` was changed to private access +* `withDenyStatus(models.DenyStatusMode)` was removed * `validate()` was removed +* `withStatus(models.ResourceStatusMode)` was removed -#### `models.DeploymentStacksParametersLink` was modified +#### `models.ResourceReference` was modified * `validate()` was removed -### Features Added - -* `models.DeploymentExternalInputDefinition` was added - -* `models.DeploymentStacksChangeBase` was added - -* `models.DeploymentStacksWhatIfResult` was added - -* `models.DeploymentStacksWhatIfResultProperties` was added - -* `models.DeploymentExtensionConfigItem` was added - -* `models.DeploymentStacksWhatIfResult$UpdateStages` was added - -* `models.DeploymentStacksChangeBaseDeploymentStacksManagementStatus` was added - -* `models.DeploymentStacksResourcesWithoutDeleteSupportEnum` was added +#### `models.KeyVaultReference` was modified -* `models.DeploymentStacksChangeDeltaRecord` was added +* `validate()` was removed -* `models.DeploymentStacksWhatIfPropertyChangeType` was added +#### `models.DeploymentStacksParametersLink` was modified -* `models.DeploymentStacksWhatIfResultsAtManagementGroups` was added +* `validate()` was removed -* `models.DeploymentExtensionConfig` was added +### Features Added -* `models.DeploymentExtension` was added +* `models.DeploymentExternalInputDefinition` was added * `models.DeploymentStacksWhatIfResultsAtSubscriptions` was added * `models.DeploymentStacksDiagnosticLevel` was added +* `models.DeploymentStacksChangeBase` was added + * `models.DeploymentStacksChangeDeltaDenySettings` was added * `models.DeploymentStacksWhatIfResourceChange` was added @@ -145,143 +107,112 @@ * `models.DeploymentStacksWhatIfResultsAtResourceGroups` was added +* `models.DeploymentStacksWhatIfResult` was added + * `models.DeploymentStacksManagementStatus` was added * `models.DeploymentExternalInput` was added +* `models.DeploymentStacksWhatIfResultProperties` was added + +* `models.DeploymentExtensionConfigItem` was added + * `models.ErrorAdditionalInfo` was added +* `models.DeploymentStacksWhatIfResult$UpdateStages` was added + * `models.DeploymentStacksWhatIfResult$Update` was added * `models.DeploymentStacksChangeBaseDenyStatusMode` was added * `models.DeploymentStacksDiagnostic` was added +* `models.DeploymentStacksChangeBaseDeploymentStacksManagementStatus` was added + +* `models.DeploymentStacksResourcesWithoutDeleteSupportEnum` was added + * `models.ValidationLevel` was added +* `models.DeploymentStacksChangeDeltaRecord` was added + * `models.DeploymentStacksWhatIfPropertyChange` was added +* `models.DeploymentStacksWhatIfPropertyChangeType` was added + +* `models.DeploymentStacksWhatIfResultsAtManagementGroups` was added + * `models.DeploymentStacksWhatIfChangeCertainty` was added * `models.DeploymentStacksWhatIfResult$Definition` was added -* `models.DeploymentStacksWhatIfChange` was added +* `models.DeploymentExtensionConfig` was added -* `models.DeploymentStacksWhatIfChangeType` was added +* `models.DeploymentExtension` was added -#### `models.DeploymentStacks` was modified +* `models.DeploymentStacksWhatIfChange` was added -* `deleteAtManagementGroup(java.lang.String,java.lang.String,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksResourcesWithoutDeleteSupportEnum,java.lang.Boolean,com.azure.core.util.Context)` was added -* `delete(java.lang.String,java.lang.String,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksResourcesWithoutDeleteSupportEnum,java.lang.Boolean,com.azure.core.util.Context)` was added -* `deleteByIdWithResponse(java.lang.String,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksResourcesWithoutDeleteSupportEnum,java.lang.Boolean,com.azure.core.util.Context)` was added -* `deleteAtSubscription(java.lang.String,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksResourcesWithoutDeleteSupportEnum,java.lang.Boolean,com.azure.core.util.Context)` was added +* `models.DeploymentStacksWhatIfChangeType` was added -#### `models.DeploymentStack$Definition` was modified +#### `models.DeploymentStackProperties` was modified -* `withValidationLevel(models.ValidationLevel)` was added -* `withError(com.azure.core.management.exception.ManagementError)` was added -* `withTemplate(java.util.Map)` was added -* `withTemplateLink(models.DeploymentStacksTemplateLink)` was added -* `withActionOnUnmanage(models.ActionOnUnmanage)` was added -* `withDescription(java.lang.String)` was added -* `withExternalInputDefinitions(java.util.Map)` was added -* `withDeploymentScope(java.lang.String)` was added -* `withParameters(java.util.Map)` was added -* `withDebugSetting(models.DeploymentStacksDebugSetting)` was added -* `withBypassStackOutOfSyncError(java.lang.Boolean)` was added * `withExternalInputs(java.util.Map)` was added -* `withExtensionConfigs(java.util.Map)` was added -* `withParametersLink(models.DeploymentStacksParametersLink)` was added -* `withDenySettings(models.DenySettings)` was added - -#### `models.DeploymentStack` was modified - -* `externalInputs()` was added -* `denySettings()` was added -* `bypassStackOutOfSyncError()` was added * `extensionConfigs()` was added -* `deploymentId()` was added -* `debugSetting()` was added +* `withExternalInputDefinitions(java.util.Map)` was added * `validationLevel()` was added -* `provisioningState()` was added -* `failedResources()` was added -* `template()` was added -* `deploymentScope()` was added * `deploymentExtensions()` was added -* `outputs()` was added -* `parameters()` was added -* `correlationId()` was added -* `description()` was added -* `templateLink()` was added -* `detachedResources()` was added -* `actionOnUnmanage()` was added -* `parametersLink()` was added -* `error()` was added -* `duration()` was added +* `withValidationLevel(models.ValidationLevel)` was added +* `externalInputs()` was added +* `withExtensionConfigs(java.util.Map)` was added * `externalInputDefinitions()` was added -* `deletedResources()` was added -* `resources()` was added -#### `models.ResourceReferenceExtended` was modified +#### `models.DeploymentStacks` was modified -* `identifiers()` was added -* `type()` was added -* `apiVersion()` was added -* `extension()` was added +* `deleteByIdWithResponse(java.lang.String,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksResourcesWithoutDeleteSupportEnum,java.lang.Boolean,com.azure.core.util.Context)` was added +* `deleteAtSubscription(java.lang.String,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksResourcesWithoutDeleteSupportEnum,java.lang.Boolean,com.azure.core.util.Context)` was added +* `delete(java.lang.String,java.lang.String,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksResourcesWithoutDeleteSupportEnum,java.lang.Boolean,com.azure.core.util.Context)` was added +* `deleteAtManagementGroup(java.lang.String,java.lang.String,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksDeleteDetachEnum,models.DeploymentStacksResourcesWithoutDeleteSupportEnum,java.lang.Boolean,com.azure.core.util.Context)` was added -#### `DeploymentStacksManager` was modified +#### `models.ActionOnUnmanage` was modified -* `deploymentStacksWhatIfResultsAtManagementGroups()` was added -* `deploymentStacksWhatIfResultsAtResourceGroups()` was added -* `deploymentStacksWhatIfResultsAtSubscriptions()` was added +* `resourcesWithoutDeleteSupport()` was added +* `withResourcesWithoutDeleteSupport(models.DeploymentStacksResourcesWithoutDeleteSupportEnum)` was added -#### `models.ManagedResourceReference` was modified +#### `models.ResourceReferenceExtended` was modified * `extension()` was added -* `type()` was added * `identifiers()` was added * `apiVersion()` was added +* `type()` was added -#### `models.DeploymentStack$Update` was modified - -* `withParameters(java.util.Map)` was added -* `withDenySettings(models.DenySettings)` was added -* `withDeploymentScope(java.lang.String)` was added -* `withExternalInputDefinitions(java.util.Map)` was added -* `withParametersLink(models.DeploymentStacksParametersLink)` was added -* `withError(com.azure.core.management.exception.ManagementError)` was added -* `withTemplate(java.util.Map)` was added -* `withTemplateLink(models.DeploymentStacksTemplateLink)` was added -* `withActionOnUnmanage(models.ActionOnUnmanage)` was added -* `withBypassStackOutOfSyncError(java.lang.Boolean)` was added -* `withDescription(java.lang.String)` was added -* `withValidationLevel(models.ValidationLevel)` was added -* `withExternalInputs(java.util.Map)` was added -* `withExtensionConfigs(java.util.Map)` was added -* `withDebugSetting(models.DeploymentStacksDebugSetting)` was added - -#### `models.ActionOnUnmanage` was modified +#### `DeploymentStacksManager` was modified -* `withResourcesWithoutDeleteSupport(models.DeploymentStacksResourcesWithoutDeleteSupportEnum)` was added -* `resourcesWithoutDeleteSupport()` was added +* `deploymentStacksWhatIfResultsAtSubscriptions()` was added +* `deploymentStacksWhatIfResultsAtResourceGroups()` was added +* `deploymentStacksWhatIfResultsAtManagementGroups()` was added #### `models.DeploymentStackValidateProperties` was modified -* `validationLevel()` was added * `deploymentExtensions()` was added +* `validationLevel()` was added #### `models.DeploymentParameter` was modified -* `withValue(com.azure.core.util.BinaryData)` was added * `withExpression(java.lang.String)` was added * `expression()` was added -#### `models.ResourceReference` was modified +#### `models.ManagedResourceReference` was modified +* `apiVersion()` was added * `type()` was added * `identifiers()` was added * `extension()` was added + +#### `models.ResourceReference` was modified + * `apiVersion()` was added +* `identifiers()` was added +* `type()` was added +* `extension()` was added ## 1.0.0 (2025-07-10) diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/SAMPLE.md b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/SAMPLE.md index f2f04c3f9a5f..95972b93e7cb 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/SAMPLE.md +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/SAMPLE.md @@ -48,7 +48,6 @@ ### DeploymentStacks_CreateOrUpdateAtManagementGroup ```java -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; @@ -56,8 +55,8 @@ import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsM import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; -import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -78,26 +77,23 @@ public final class DeploymentStacksCreateOrUpdateAtManagementGroupSamples { com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .createOrUpdateAtManagementGroup("myMg", "simpleDeploymentStack", - new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withParameters(mapOf("parameter1", - new DeploymentParameter() - .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) - .withExtensionConfigs( - mapOf("contoso", - new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", - new DeploymentExtensionConfigItem() - .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), - "configOne", - new DeploymentExtensionConfigItem().withValue( - BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), + new DeploymentStackInner() + .withProperties(new DeploymentStackProperties() + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties( + mapOf("configTwo", new DeploymentExtensionConfigItem().withValue(true), "configOne", + new DeploymentExtensionConfigItem().withValue("config1Value"))))) + .withActionOnUnmanage( + new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false))) + .withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); } @@ -118,15 +114,14 @@ public final class DeploymentStacksCreateOrUpdateAtManagementGroupSamples { ### DeploymentStacks_CreateOrUpdateAtResourceGroup ```java -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; -import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -150,25 +145,19 @@ public final class DeploymentStacksCreateOrUpdateAtResourceGroupSamples { .withExistingResourceGroup("deploymentStacksRG") .withRegion("eastus") .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withParameters(mapOf("parameter1", - new DeploymentParameter().withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) - .withExtensionConfigs( - mapOf("contoso", - new DeploymentExtensionConfig() - .withAdditionalProperties( - mapOf("configTwo", - new DeploymentExtensionConfigItem() - .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), - "configOne", - new DeploymentExtensionConfigItem().withValue( - BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)) + .withProperties(new DeploymentStackProperties() + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties( + mapOf("configTwo", new DeploymentExtensionConfigItem().withValue(true), "configOne", + new DeploymentExtensionConfigItem().withValue("config1Value"))))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false))) .create(); } @@ -189,7 +178,6 @@ public final class DeploymentStacksCreateOrUpdateAtResourceGroupSamples { ### DeploymentStacks_CreateOrUpdateAtSubscription ```java -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; @@ -197,8 +185,8 @@ import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsM import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; -import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -219,26 +207,23 @@ public final class DeploymentStacksCreateOrUpdateAtSubscriptionSamples { com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .createOrUpdateAtSubscription("simpleDeploymentStack", - new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withParameters(mapOf("parameter1", - new DeploymentParameter() - .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) - .withExtensionConfigs( - mapOf("contoso", - new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", - new DeploymentExtensionConfigItem() - .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), - "configOne", - new DeploymentExtensionConfigItem().withValue( - BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), + new DeploymentStackInner() + .withProperties(new DeploymentStackProperties() + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties( + mapOf("configTwo", new DeploymentExtensionConfigItem().withValue(true), "configOne", + new DeploymentExtensionConfigItem().withValue("config1Value"))))) + .withActionOnUnmanage( + new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false))) + .withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); } @@ -541,15 +526,14 @@ public final class DeploymentStacksListByResourceGroupSamples { ### DeploymentStacks_ValidateStackAtManagementGroup ```java -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; -import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -569,22 +553,20 @@ public final class DeploymentStacksValidateStackAtManagementGroupSamples { public static void validateAManagementGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .validateStackAtManagementGroup("myMg", "simpleDeploymentStack", - new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .validateStackAtManagementGroup("myMg", "simpleDeploymentStack", new DeploymentStackInner() + .withProperties(new DeploymentStackProperties() .withTemplateLink( new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", - new DeploymentParameter() - .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DETACH) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DETACH) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), - com.azure.core.util.Context.NONE); + .withApplyToChildScopes(false))) + .withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -604,15 +586,14 @@ public final class DeploymentStacksValidateStackAtManagementGroupSamples { ### DeploymentStacks_ValidateStackAtResourceGroup ```java -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; -import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -633,19 +614,18 @@ public final class DeploymentStacksValidateStackAtResourceGroupSamples { com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .validateStackAtResourceGroup("deploymentStacksRG", "simpleDeploymentStack", - new DeploymentStackInner().withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + new DeploymentStackInner().withProperties(new DeploymentStackProperties() .withTemplateLink( new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", - new DeploymentParameter() - .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), + .withApplyToChildScopes(false))) + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); } @@ -666,15 +646,14 @@ public final class DeploymentStacksValidateStackAtResourceGroupSamples { ### DeploymentStacks_ValidateStackAtSubscription ```java -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; -import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -694,22 +673,20 @@ public final class DeploymentStacksValidateStackAtSubscriptionSamples { public static void validateASubscriptionDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .validateStackAtSubscription("simpleDeploymentStack", - new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .validateStackAtSubscription("simpleDeploymentStack", new DeploymentStackInner() + .withProperties(new DeploymentStackProperties() .withTemplateLink( new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", - new DeploymentParameter() - .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), - com.azure.core.util.Context.NONE); + .withApplyToChildScopes(false))) + .withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -729,7 +706,6 @@ public final class DeploymentStacksValidateStackAtSubscriptionSamples { ### DeploymentStacksWhatIfResultsAtManagementGroup_CreateOrUpdate ```java -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; @@ -739,7 +715,6 @@ import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExt import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; -import java.nio.charset.StandardCharsets; import java.time.Duration; import java.util.HashMap; import java.util.Map; @@ -760,28 +735,21 @@ public final class DeploymentStacksWhatIfResultsAtManagementGroupCreateOrUpdateS com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacksWhatIfResultsAtManagementGroups() .createOrUpdate("myMg", "simpleDeploymentStackWhatIfResult", - new DeploymentStacksWhatIfResultInner() - .withProperties(new DeploymentStacksWhatIfResultProperties() - .withTemplateLink( - new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf()) - .withExtensionConfigs(mapOf("contoso", - new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", - new DeploymentExtensionConfigItem() - .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), - "configOne", - new DeploymentExtensionConfigItem().withValue( - BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) - .withActionOnUnmanage(new ActionOnUnmanage() - .withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings( - new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) - .withDeploymentStackResourceId( - "/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") - .withRetentionInterval(Duration.parse("P7D"))) - .withLocation("eastus"), + new DeploymentStacksWhatIfResultInner().withProperties(new DeploymentStacksWhatIfResultProperties() + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf()) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties( + mapOf("configTwo", new DeploymentExtensionConfigItem().withValue(true), "configOne", + new DeploymentExtensionConfigItem().withValue("config1Value"))))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) + .withDeploymentStackResourceId( + "/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") + .withRetentionInterval(Duration.parse("P7D"))).withLocation("eastus"), com.azure.core.util.Context.NONE); } @@ -895,7 +863,6 @@ public final class DeploymentStacksWhatIfResultsAtManagementGroupWhatIfSamples { ### DeploymentStacksWhatIfResultsAtResourceGroup_CreateOrUpdate ```java -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; @@ -904,7 +871,6 @@ import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExt import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; -import java.nio.charset.StandardCharsets; import java.time.Duration; import java.util.HashMap; import java.util.Map; @@ -927,27 +893,21 @@ public final class DeploymentStacksWhatIfResultsAtResourceGroupCreateOrUpdateSam .define("simpleDeploymentStackWhatIfResult") .withExistingResourceGroup("myResourceGroup") .withRegion("eastus") - .withProperties( - new DeploymentStacksWhatIfResultProperties() - .withTemplateLink( - new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf()) - .withExtensionConfigs( - mapOf("contoso", - new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", - new DeploymentExtensionConfigItem() - .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), - "configOne", - new DeploymentExtensionConfigItem().withValue( - BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) - .withActionOnUnmanage(new ActionOnUnmanage() - .withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) - .withDeploymentStackResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") - .withRetentionInterval(Duration.parse("P7D"))) + .withProperties(new DeploymentStacksWhatIfResultProperties() + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf()) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties( + mapOf("configTwo", new DeploymentExtensionConfigItem().withValue(true), "configOne", + new DeploymentExtensionConfigItem().withValue("config1Value"))))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) + .withDeploymentStackResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") + .withRetentionInterval(Duration.parse("P7D"))) .create(); } @@ -1063,7 +1023,6 @@ public final class DeploymentStacksWhatIfResultsAtResourceGroupWhatIfSamples { ### DeploymentStacksWhatIfResultsAtSubscription_CreateOrUpdate ```java -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; @@ -1073,7 +1032,6 @@ import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExt import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; -import java.nio.charset.StandardCharsets; import java.time.Duration; import java.util.HashMap; import java.util.Map; @@ -1094,28 +1052,21 @@ public final class DeploymentStacksWhatIfResultsAtSubscriptionCreateOrUpdateSamp com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacksWhatIfResultsAtSubscriptions() .createOrUpdate("simpleDeploymentStackWhatIfResult", - new DeploymentStacksWhatIfResultInner() - .withProperties(new DeploymentStacksWhatIfResultProperties() - .withTemplateLink( - new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf()) - .withExtensionConfigs(mapOf("contoso", - new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", - new DeploymentExtensionConfigItem() - .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), - "configOne", - new DeploymentExtensionConfigItem().withValue( - BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) - .withActionOnUnmanage(new ActionOnUnmanage() - .withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings( - new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) - .withDeploymentStackResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") - .withRetentionInterval(Duration.parse("P7D"))) - .withLocation("eastus"), + new DeploymentStacksWhatIfResultInner().withProperties(new DeploymentStacksWhatIfResultProperties() + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf()) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties( + mapOf("configTwo", new DeploymentExtensionConfigItem().withValue(true), "configOne", + new DeploymentExtensionConfigItem().withValue("config1Value"))))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) + .withDeploymentStackResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") + .withRetentionInterval(Duration.parse("P7D"))).withLocation("eastus"), com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackInner.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackInner.java index 77b1168c62d9..ea83e23d0f44 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackInner.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackInner.java @@ -7,28 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; -import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtension; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInput; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInputDefinition; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProvisioningState; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDebugSetting; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksParametersLink; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; -import com.azure.resourcemanager.resources.deploymentstacks.models.ManagedResourceReference; -import com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReference; -import com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReferenceExtended; -import com.azure.resourcemanager.resources.deploymentstacks.models.ValidationLevel; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** @@ -39,7 +22,7 @@ public final class DeploymentStackInner extends ProxyResource { /* * Deployment stack properties. */ - private DeploymentStackProperties innerProperties; + private DeploymentStackProperties properties; /* * The geo-location where the resource lives. Required for subscription and management group scoped stacks. The @@ -79,12 +62,23 @@ public DeploymentStackInner() { } /** - * Get the innerProperties property: Deployment stack properties. + * Get the properties property: Deployment stack properties. * - * @return the innerProperties value. + * @return the properties value. */ - private DeploymentStackProperties innerProperties() { - return this.innerProperties; + public DeploymentStackProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Deployment stack properties. + * + * @param properties the properties value to set. + * @return the DeploymentStackInner object itself. + */ + public DeploymentStackInner withProperties(DeploymentStackProperties properties) { + this.properties = properties; + return this; } /** @@ -168,484 +162,13 @@ public String id() { return this.id; } - /** - * Get the error property: The error detail. - * - * @return the error value. - */ - public ManagementError error() { - return this.innerProperties() == null ? null : this.innerProperties().error(); - } - - /** - * Set the error property: The error detail. - * - * @param error the error value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withError(ManagementError error) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withError(error); - return this; - } - - /** - * Get the template property: The template content. You use this element when you want to pass the template syntax - * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. - * Use either the templateLink property or the template property, but not both. - * - * @return the template value. - */ - public Map template() { - return this.innerProperties() == null ? null : this.innerProperties().template(); - } - - /** - * Set the template property: The template content. You use this element when you want to pass the template syntax - * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. - * Use either the templateLink property or the template property, but not both. - * - * @param template the template value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withTemplate(Map template) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withTemplate(template); - return this; - } - - /** - * Get the templateLink property: The URI of the template. Use either the templateLink property or the template - * property, but not both. - * - * @return the templateLink value. - */ - public DeploymentStacksTemplateLink templateLink() { - return this.innerProperties() == null ? null : this.innerProperties().templateLink(); - } - - /** - * Set the templateLink property: The URI of the template. Use either the templateLink property or the template - * property, but not both. - * - * @param templateLink the templateLink value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withTemplateLink(DeploymentStacksTemplateLink templateLink) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withTemplateLink(templateLink); - return this; - } - - /** - * Get the parameters property: Name and value pairs that define the deployment parameters for the template. Use - * this element when providing the parameter values directly in the request, rather than linking to an existing - * parameter file. Use either the parametersLink property or the parameters property, but not both. - * - * @return the parameters value. - */ - public Map parameters() { - return this.innerProperties() == null ? null : this.innerProperties().parameters(); - } - - /** - * Set the parameters property: Name and value pairs that define the deployment parameters for the template. Use - * this element when providing the parameter values directly in the request, rather than linking to an existing - * parameter file. Use either the parametersLink property or the parameters property, but not both. - * - * @param parameters the parameters value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withParameters(Map parameters) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withParameters(parameters); - return this; - } - - /** - * Get the parametersLink property: The URI of parameters file. Use this element to link to an existing parameters - * file. Use either the parametersLink property or the parameters property, but not both. - * - * @return the parametersLink value. - */ - public DeploymentStacksParametersLink parametersLink() { - return this.innerProperties() == null ? null : this.innerProperties().parametersLink(); - } - - /** - * Set the parametersLink property: The URI of parameters file. Use this element to link to an existing parameters - * file. Use either the parametersLink property or the parameters property, but not both. - * - * @param parametersLink the parametersLink value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withParametersLink(DeploymentStacksParametersLink parametersLink) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withParametersLink(parametersLink); - return this; - } - - /** - * Get the extensionConfigs property: The deployment extension configs. Keys of this object are extension aliases as - * defined in the deployment template. - * - * @return the extensionConfigs value. - */ - public Map extensionConfigs() { - return this.innerProperties() == null ? null : this.innerProperties().extensionConfigs(); - } - - /** - * Set the extensionConfigs property: The deployment extension configs. Keys of this object are extension aliases as - * defined in the deployment template. - * - * @param extensionConfigs the extensionConfigs value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withExtensionConfigs(Map extensionConfigs) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withExtensionConfigs(extensionConfigs); - return this; - } - - /** - * Get the externalInputs property: External input values, used by external tooling for parameter evaluation. - * - * @return the externalInputs value. - */ - public Map externalInputs() { - return this.innerProperties() == null ? null : this.innerProperties().externalInputs(); - } - - /** - * Set the externalInputs property: External input values, used by external tooling for parameter evaluation. - * - * @param externalInputs the externalInputs value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withExternalInputs(Map externalInputs) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withExternalInputs(externalInputs); - return this; - } - - /** - * Get the externalInputDefinitions property: External input definitions, used by external tooling to define - * expected external input values. - * - * @return the externalInputDefinitions value. - */ - public Map externalInputDefinitions() { - return this.innerProperties() == null ? null : this.innerProperties().externalInputDefinitions(); - } - - /** - * Set the externalInputDefinitions property: External input definitions, used by external tooling to define - * expected external input values. - * - * @param externalInputDefinitions the externalInputDefinitions value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner - withExternalInputDefinitions(Map externalInputDefinitions) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withExternalInputDefinitions(externalInputDefinitions); - return this; - } - - /** - * Get the actionOnUnmanage property: Defines the behavior of resources that are no longer managed after the - * Deployment stack is updated or deleted. - * - * @return the actionOnUnmanage value. - */ - public ActionOnUnmanage actionOnUnmanage() { - return this.innerProperties() == null ? null : this.innerProperties().actionOnUnmanage(); - } - - /** - * Set the actionOnUnmanage property: Defines the behavior of resources that are no longer managed after the - * Deployment stack is updated or deleted. - * - * @param actionOnUnmanage the actionOnUnmanage value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withActionOnUnmanage(ActionOnUnmanage actionOnUnmanage) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withActionOnUnmanage(actionOnUnmanage); - return this; - } - - /** - * Get the debugSetting property: The debug setting of the deployment. - * - * @return the debugSetting value. - */ - public DeploymentStacksDebugSetting debugSetting() { - return this.innerProperties() == null ? null : this.innerProperties().debugSetting(); - } - - /** - * Set the debugSetting property: The debug setting of the deployment. - * - * @param debugSetting the debugSetting value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withDebugSetting(DeploymentStacksDebugSetting debugSetting) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withDebugSetting(debugSetting); - return this; - } - - /** - * Get the deploymentScope property: The scope at which the initial deployment should be created. If a scope is not - * specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: - * '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: - * '/subscriptions/{subscriptionId}'), resource group (format: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). - * - * @return the deploymentScope value. - */ - public String deploymentScope() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentScope(); - } - - /** - * Set the deploymentScope property: The scope at which the initial deployment should be created. If a scope is not - * specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: - * '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: - * '/subscriptions/{subscriptionId}'), resource group (format: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). - * - * @param deploymentScope the deploymentScope value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withDeploymentScope(String deploymentScope) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withDeploymentScope(deploymentScope); - return this; - } - - /** - * Get the description property: Deployment stack description. Max length of 4096 characters. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: Deployment stack description. Max length of 4096 characters. - * - * @param description the description value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the denySettings property: Defines how resources deployed by the stack are locked. - * - * @return the denySettings value. - */ - public DenySettings denySettings() { - return this.innerProperties() == null ? null : this.innerProperties().denySettings(); - } - - /** - * Set the denySettings property: Defines how resources deployed by the stack are locked. - * - * @param denySettings the denySettings value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withDenySettings(DenySettings denySettings) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withDenySettings(denySettings); - return this; - } - - /** - * Get the provisioningState property: State of the deployment stack. - * - * @return the provisioningState value. - */ - public DeploymentStackProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the correlationId property: The correlation id of the last Deployment stack upsert or delete operation. It is - * in GUID format and is used for tracing. - * - * @return the correlationId value. - */ - public String correlationId() { - return this.innerProperties() == null ? null : this.innerProperties().correlationId(); - } - - /** - * Get the validationLevel property: The validation level of the deployment stack. - * - * @return the validationLevel value. - */ - public ValidationLevel validationLevel() { - return this.innerProperties() == null ? null : this.innerProperties().validationLevel(); - } - - /** - * Set the validationLevel property: The validation level of the deployment stack. - * - * @param validationLevel the validationLevel value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withValidationLevel(ValidationLevel validationLevel) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withValidationLevel(validationLevel); - return this; - } - - /** - * Get the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack resource list - * is not correctly synchronized. - * - * @return the bypassStackOutOfSyncError value. - */ - public Boolean bypassStackOutOfSyncError() { - return this.innerProperties() == null ? null : this.innerProperties().bypassStackOutOfSyncError(); - } - - /** - * Set the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack resource list - * is not correctly synchronized. - * - * @param bypassStackOutOfSyncError the bypassStackOutOfSyncError value to set. - * @return the DeploymentStackInner object itself. - */ - public DeploymentStackInner withBypassStackOutOfSyncError(Boolean bypassStackOutOfSyncError) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentStackProperties(); - } - this.innerProperties().withBypassStackOutOfSyncError(bypassStackOutOfSyncError); - return this; - } - - /** - * Get the detachedResources property: An array of resources that were detached during the most recent Deployment - * stack update. Detached means that the resource was removed from the template, but no relevant deletion operations - * were specified. So, the resource still exists while no longer being associated with the stack. - * - * @return the detachedResources value. - */ - public List detachedResources() { - return this.innerProperties() == null ? null : this.innerProperties().detachedResources(); - } - - /** - * Get the deletedResources property: An array of resources that were deleted during the most recent Deployment - * stack update. Deleted means that the resource was removed from the template and relevant deletion operations were - * specified. - * - * @return the deletedResources value. - */ - public List deletedResources() { - return this.innerProperties() == null ? null : this.innerProperties().deletedResources(); - } - - /** - * Get the failedResources property: An array of resources that failed to reach goal state during the most recent - * update. Each resourceId is accompanied by an error message. - * - * @return the failedResources value. - */ - public List failedResources() { - return this.innerProperties() == null ? null : this.innerProperties().failedResources(); - } - - /** - * Get the resources property: An array of resources currently managed by the deployment stack. - * - * @return the resources value. - */ - public List resources() { - return this.innerProperties() == null ? null : this.innerProperties().resources(); - } - - /** - * Get the deploymentExtensions property: The extensions used during deployment. Contains extension data for all - * extensible resources managed by the stack. - * - * @return the deploymentExtensions value. - */ - public List deploymentExtensions() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentExtensions(); - } - - /** - * Get the deploymentId property: The resourceId of the deployment resource created by the deployment stack. - * - * @return the deploymentId value. - */ - public String deploymentId() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentId(); - } - - /** - * Get the outputs property: The outputs of the deployment resource created by the deployment stack. - * - * @return the outputs value. - */ - public Map outputs() { - return this.innerProperties() == null ? null : this.innerProperties().outputs(); - } - - /** - * Get the duration property: The duration of the last successful Deployment stack update. - * - * @return the duration value. - */ - public String duration() { - return this.innerProperties() == null ? null : this.innerProperties().duration(); - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); jsonWriter.writeStringField("location", this.location); jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); @@ -674,7 +197,7 @@ public static DeploymentStackInner fromJson(JsonReader jsonReader) throws IOExce } else if ("type".equals(fieldName)) { deserializedDeploymentStackInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedDeploymentStackInner.innerProperties = DeploymentStackProperties.fromJson(reader); + deserializedDeploymentStackInner.properties = DeploymentStackProperties.fromJson(reader); } else if ("location".equals(fieldName)) { deserializedDeploymentStackInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackTemplateDefinitionInner.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackTemplateDefinitionInner.java index b361ecadf067..14ef5fff9984 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackTemplateDefinitionInner.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackTemplateDefinitionInner.java @@ -5,14 +5,12 @@ package com.azure.resourcemanager.resources.deploymentstacks.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; import java.io.IOException; -import java.util.Map; /** * Export Template specific properties of the Deployment stack. @@ -25,7 +23,7 @@ public final class DeploymentStackTemplateDefinitionInner * existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the * template property, but not both. */ - private Map template; + private Object template; /* * The URI of the template. Use either the templateLink property or the template property, but not both. @@ -45,7 +43,7 @@ private DeploymentStackTemplateDefinitionInner() { * * @return the template value. */ - public Map template() { + public Object template() { return this.template; } @@ -65,8 +63,9 @@ public DeploymentStacksTemplateLink templateLink() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("template", this.template, - (writer, element) -> writer.writeUntyped(element == null ? null : element.toObject(Object.class))); + if (this.template != null) { + jsonWriter.writeUntypedField("template", this.template); + } jsonWriter.writeJsonField("templateLink", this.templateLink); return jsonWriter.writeEndObject(); } @@ -88,9 +87,7 @@ public static DeploymentStackTemplateDefinitionInner fromJson(JsonReader jsonRea reader.nextToken(); if ("template".equals(fieldName)) { - Map template = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); - deserializedDeploymentStackTemplateDefinitionInner.template = template; + deserializedDeploymentStackTemplateDefinitionInner.template = reader.readUntyped(); } else if ("templateLink".equals(fieldName)) { deserializedDeploymentStackTemplateDefinitionInner.templateLink = DeploymentStacksTemplateLink.fromJson(reader); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackImpl.java index 0b8e3ca38214..8add308e0ba0 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackImpl.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackImpl.java @@ -7,30 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.management.SystemData; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; -import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; -import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtension; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInput; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInputDefinition; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStack; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProvisioningState; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackTemplateDefinition; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackValidateResult; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDebugSetting; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksParametersLink; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; -import com.azure.resourcemanager.resources.deploymentstacks.models.ManagedResourceReference; -import com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReference; -import com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReferenceExtended; -import com.azure.resourcemanager.resources.deploymentstacks.models.ValidationLevel; import java.util.Collections; -import java.util.List; import java.util.Map; public final class DeploymentStackImpl implements DeploymentStack, DeploymentStack.Definition, DeploymentStack.Update { @@ -50,6 +33,10 @@ public String type() { return this.innerModel().type(); } + public DeploymentStackProperties properties() { + return this.innerModel().properties(); + } + public String location() { return this.innerModel().location(); } @@ -67,161 +54,6 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public ManagementError error() { - return this.innerModel().error(); - } - - public Map template() { - Map inner = this.innerModel().template(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public DeploymentStacksTemplateLink templateLink() { - return this.innerModel().templateLink(); - } - - public Map parameters() { - Map inner = this.innerModel().parameters(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public DeploymentStacksParametersLink parametersLink() { - return this.innerModel().parametersLink(); - } - - public Map extensionConfigs() { - Map inner = this.innerModel().extensionConfigs(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public Map externalInputs() { - Map inner = this.innerModel().externalInputs(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public Map externalInputDefinitions() { - Map inner = this.innerModel().externalInputDefinitions(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ActionOnUnmanage actionOnUnmanage() { - return this.innerModel().actionOnUnmanage(); - } - - public DeploymentStacksDebugSetting debugSetting() { - return this.innerModel().debugSetting(); - } - - public String deploymentScope() { - return this.innerModel().deploymentScope(); - } - - public String description() { - return this.innerModel().description(); - } - - public DenySettings denySettings() { - return this.innerModel().denySettings(); - } - - public DeploymentStackProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String correlationId() { - return this.innerModel().correlationId(); - } - - public ValidationLevel validationLevel() { - return this.innerModel().validationLevel(); - } - - public Boolean bypassStackOutOfSyncError() { - return this.innerModel().bypassStackOutOfSyncError(); - } - - public List detachedResources() { - List inner = this.innerModel().detachedResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List deletedResources() { - List inner = this.innerModel().deletedResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List failedResources() { - List inner = this.innerModel().failedResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List resources() { - List inner = this.innerModel().resources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List deploymentExtensions() { - List inner = this.innerModel().deploymentExtensions(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String deploymentId() { - return this.innerModel().deploymentId(); - } - - public Map outputs() { - Map inner = this.innerModel().outputs(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public String duration() { - return this.innerModel().duration(); - } - public Region region() { return Region.fromName(this.regionName()); } @@ -349,79 +181,8 @@ public DeploymentStackImpl withTags(Map tags) { return this; } - public DeploymentStackImpl withError(ManagementError error) { - this.innerModel().withError(error); - return this; - } - - public DeploymentStackImpl withTemplate(Map template) { - this.innerModel().withTemplate(template); - return this; - } - - public DeploymentStackImpl withTemplateLink(DeploymentStacksTemplateLink templateLink) { - this.innerModel().withTemplateLink(templateLink); - return this; - } - - public DeploymentStackImpl withParameters(Map parameters) { - this.innerModel().withParameters(parameters); - return this; - } - - public DeploymentStackImpl withParametersLink(DeploymentStacksParametersLink parametersLink) { - this.innerModel().withParametersLink(parametersLink); - return this; - } - - public DeploymentStackImpl withExtensionConfigs(Map extensionConfigs) { - this.innerModel().withExtensionConfigs(extensionConfigs); - return this; - } - - public DeploymentStackImpl withExternalInputs(Map externalInputs) { - this.innerModel().withExternalInputs(externalInputs); - return this; - } - - public DeploymentStackImpl - withExternalInputDefinitions(Map externalInputDefinitions) { - this.innerModel().withExternalInputDefinitions(externalInputDefinitions); - return this; - } - - public DeploymentStackImpl withActionOnUnmanage(ActionOnUnmanage actionOnUnmanage) { - this.innerModel().withActionOnUnmanage(actionOnUnmanage); - return this; - } - - public DeploymentStackImpl withDebugSetting(DeploymentStacksDebugSetting debugSetting) { - this.innerModel().withDebugSetting(debugSetting); - return this; - } - - public DeploymentStackImpl withDeploymentScope(String deploymentScope) { - this.innerModel().withDeploymentScope(deploymentScope); - return this; - } - - public DeploymentStackImpl withDescription(String description) { - this.innerModel().withDescription(description); - return this; - } - - public DeploymentStackImpl withDenySettings(DenySettings denySettings) { - this.innerModel().withDenySettings(denySettings); - return this; - } - - public DeploymentStackImpl withValidationLevel(ValidationLevel validationLevel) { - this.innerModel().withValidationLevel(validationLevel); - return this; - } - - public DeploymentStackImpl withBypassStackOutOfSyncError(Boolean bypassStackOutOfSyncError) { - this.innerModel().withBypassStackOutOfSyncError(bypassStackOutOfSyncError); + public DeploymentStackImpl withProperties(DeploymentStackProperties properties) { + this.innerModel().withProperties(properties); return this; } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackTemplateDefinitionImpl.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackTemplateDefinitionImpl.java index 99e97c50324f..dfc5f84bdf38 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackTemplateDefinitionImpl.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackTemplateDefinitionImpl.java @@ -4,12 +4,9 @@ package com.azure.resourcemanager.resources.deploymentstacks.implementation; -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackTemplateDefinitionInner; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackTemplateDefinition; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; -import java.util.Collections; -import java.util.Map; public final class DeploymentStackTemplateDefinitionImpl implements DeploymentStackTemplateDefinition { private DeploymentStackTemplateDefinitionInner innerObject; @@ -22,13 +19,8 @@ public final class DeploymentStackTemplateDefinitionImpl implements DeploymentSt this.serviceManager = serviceManager; } - public Map template() { - Map inner = this.innerModel().template(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } + public Object template() { + return this.innerModel().template(); } public DeploymentStacksTemplateLink templateLink() { diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfigItem.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfigItem.java index 85fa9ccedd14..8554b3270b21 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfigItem.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfigItem.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -25,7 +24,7 @@ public final class DeploymentExtensionConfigItem implements JsonSerializable BinaryData.fromObject(nonNullReader.readUntyped())); + deserializedDeploymentExtensionConfigItem.value = reader.readUntyped(); } else if ("keyVaultReference".equals(fieldName)) { deserializedDeploymentExtensionConfigItem.keyVaultReference = KeyVaultParameterReference.fromJson(reader); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInput.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInput.java index 0221fc72cd06..ae74d6334f97 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInput.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInput.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,7 +19,7 @@ public final class DeploymentExternalInput implements JsonSerializable BinaryData.fromObject(nonNullReader.readUntyped())); + deserializedDeploymentExternalInput.value = reader.readUntyped(); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInputDefinition.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInputDefinition.java index c173f8866dde..71cfa138539a 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInputDefinition.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInputDefinition.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -25,7 +24,7 @@ public final class DeploymentExternalInputDefinition implements JsonSerializable /* * Configuration for the external input. */ - private BinaryData config; + private Object config; /** * Creates an instance of DeploymentExternalInputDefinition class. @@ -58,7 +57,7 @@ public DeploymentExternalInputDefinition withKind(String kind) { * * @return the config value. */ - public BinaryData config() { + public Object config() { return this.config; } @@ -68,7 +67,7 @@ public BinaryData config() { * @param config the config value to set. * @return the DeploymentExternalInputDefinition object itself. */ - public DeploymentExternalInputDefinition withConfig(BinaryData config) { + public DeploymentExternalInputDefinition withConfig(Object config) { this.config = config; return this; } @@ -81,8 +80,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("kind", this.kind); if (this.config != null) { - jsonWriter.writeFieldName("config"); - this.config.writeTo(jsonWriter); + jsonWriter.writeUntypedField("config", this.config); } return jsonWriter.writeEndObject(); } @@ -107,8 +105,7 @@ public static DeploymentExternalInputDefinition fromJson(JsonReader jsonReader) if ("kind".equals(fieldName)) { deserializedDeploymentExternalInputDefinition.kind = reader.getString(); } else if ("config".equals(fieldName)) { - deserializedDeploymentExternalInputDefinition.config - = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + deserializedDeploymentExternalInputDefinition.config = reader.readUntyped(); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentParameter.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentParameter.java index 9a1b3cbf6554..96dc6214af0c 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentParameter.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentParameter.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,7 +19,7 @@ public final class DeploymentParameter implements JsonSerializable BinaryData.fromObject(nonNullReader.readUntyped())); + deserializedDeploymentParameter.value = reader.readUntyped(); } else if ("type".equals(fieldName)) { deserializedDeploymentParameter.type = reader.getString(); } else if ("reference".equals(fieldName)) { diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStack.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStack.java index ec16fac3b7aa..f60cc7dfd2aa 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStack.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStack.java @@ -7,11 +7,8 @@ import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.management.SystemData; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; -import java.util.List; import java.util.Map; /** @@ -39,6 +36,13 @@ public interface DeploymentStack { */ String type(); + /** + * Gets the properties property: Deployment stack properties. + * + * @return the properties value. + */ + DeploymentStackProperties properties(); + /** * Gets the location property: The geo-location where the resource lives. Required for subscription and management * group scoped stacks. The location is inherited from the resource group for resource group scoped stacks. @@ -61,202 +65,6 @@ public interface DeploymentStack { */ SystemData systemData(); - /** - * Gets the error property: The error detail. - * - * @return the error value. - */ - ManagementError error(); - - /** - * Gets the template property: The template content. You use this element when you want to pass the template syntax - * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. - * Use either the templateLink property or the template property, but not both. - * - * @return the template value. - */ - Map template(); - - /** - * Gets the templateLink property: The URI of the template. Use either the templateLink property or the template - * property, but not both. - * - * @return the templateLink value. - */ - DeploymentStacksTemplateLink templateLink(); - - /** - * Gets the parameters property: Name and value pairs that define the deployment parameters for the template. Use - * this element when providing the parameter values directly in the request, rather than linking to an existing - * parameter file. Use either the parametersLink property or the parameters property, but not both. - * - * @return the parameters value. - */ - Map parameters(); - - /** - * Gets the parametersLink property: The URI of parameters file. Use this element to link to an existing parameters - * file. Use either the parametersLink property or the parameters property, but not both. - * - * @return the parametersLink value. - */ - DeploymentStacksParametersLink parametersLink(); - - /** - * Gets the extensionConfigs property: The deployment extension configs. Keys of this object are extension aliases - * as defined in the deployment template. - * - * @return the extensionConfigs value. - */ - Map extensionConfigs(); - - /** - * Gets the externalInputs property: External input values, used by external tooling for parameter evaluation. - * - * @return the externalInputs value. - */ - Map externalInputs(); - - /** - * Gets the externalInputDefinitions property: External input definitions, used by external tooling to define - * expected external input values. - * - * @return the externalInputDefinitions value. - */ - Map externalInputDefinitions(); - - /** - * Gets the actionOnUnmanage property: Defines the behavior of resources that are no longer managed after the - * Deployment stack is updated or deleted. - * - * @return the actionOnUnmanage value. - */ - ActionOnUnmanage actionOnUnmanage(); - - /** - * Gets the debugSetting property: The debug setting of the deployment. - * - * @return the debugSetting value. - */ - DeploymentStacksDebugSetting debugSetting(); - - /** - * Gets the deploymentScope property: The scope at which the initial deployment should be created. If a scope is not - * specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: - * '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: - * '/subscriptions/{subscriptionId}'), resource group (format: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). - * - * @return the deploymentScope value. - */ - String deploymentScope(); - - /** - * Gets the description property: Deployment stack description. Max length of 4096 characters. - * - * @return the description value. - */ - String description(); - - /** - * Gets the denySettings property: Defines how resources deployed by the stack are locked. - * - * @return the denySettings value. - */ - DenySettings denySettings(); - - /** - * Gets the provisioningState property: State of the deployment stack. - * - * @return the provisioningState value. - */ - DeploymentStackProvisioningState provisioningState(); - - /** - * Gets the correlationId property: The correlation id of the last Deployment stack upsert or delete operation. It - * is in GUID format and is used for tracing. - * - * @return the correlationId value. - */ - String correlationId(); - - /** - * Gets the validationLevel property: The validation level of the deployment stack. - * - * @return the validationLevel value. - */ - ValidationLevel validationLevel(); - - /** - * Gets the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack resource list - * is not correctly synchronized. - * - * @return the bypassStackOutOfSyncError value. - */ - Boolean bypassStackOutOfSyncError(); - - /** - * Gets the detachedResources property: An array of resources that were detached during the most recent Deployment - * stack update. Detached means that the resource was removed from the template, but no relevant deletion operations - * were specified. So, the resource still exists while no longer being associated with the stack. - * - * @return the detachedResources value. - */ - List detachedResources(); - - /** - * Gets the deletedResources property: An array of resources that were deleted during the most recent Deployment - * stack update. Deleted means that the resource was removed from the template and relevant deletion operations were - * specified. - * - * @return the deletedResources value. - */ - List deletedResources(); - - /** - * Gets the failedResources property: An array of resources that failed to reach goal state during the most recent - * update. Each resourceId is accompanied by an error message. - * - * @return the failedResources value. - */ - List failedResources(); - - /** - * Gets the resources property: An array of resources currently managed by the deployment stack. - * - * @return the resources value. - */ - List resources(); - - /** - * Gets the deploymentExtensions property: The extensions used during deployment. Contains extension data for all - * extensible resources managed by the stack. - * - * @return the deploymentExtensions value. - */ - List deploymentExtensions(); - - /** - * Gets the deploymentId property: The resourceId of the deployment resource created by the deployment stack. - * - * @return the deploymentId value. - */ - String deploymentId(); - - /** - * Gets the outputs property: The outputs of the deployment resource created by the deployment stack. - * - * @return the outputs value. - */ - Map outputs(); - - /** - * Gets the duration property: The duration of the last successful Deployment stack update. - * - * @return the duration value. - */ - String duration(); - /** * Gets the region of the resource. * @@ -319,13 +127,8 @@ interface WithResourceGroup { * The stage of the DeploymentStack definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, - DefinitionStages.WithError, DefinitionStages.WithTemplate, DefinitionStages.WithTemplateLink, - DefinitionStages.WithParameters, DefinitionStages.WithParametersLink, DefinitionStages.WithExtensionConfigs, - DefinitionStages.WithExternalInputs, DefinitionStages.WithExternalInputDefinitions, - DefinitionStages.WithActionOnUnmanage, DefinitionStages.WithDebugSetting, - DefinitionStages.WithDeploymentScope, DefinitionStages.WithDescription, DefinitionStages.WithDenySettings, - DefinitionStages.WithValidationLevel, DefinitionStages.WithBypassStackOutOfSyncError { + interface WithCreate + extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithProperties { /** * Executes the create request. * @@ -379,230 +182,16 @@ interface WithTags { } /** - * The stage of the DeploymentStack definition allowing to specify error. - */ - interface WithError { - /** - * Specifies the error property: The error detail.. - * - * @param error The error detail. - * @return the next definition stage. - */ - WithCreate withError(ManagementError error); - } - - /** - * The stage of the DeploymentStack definition allowing to specify template. - */ - interface WithTemplate { - /** - * Specifies the template property: The template content. You use this element when you want to pass the - * template syntax directly in the request rather than link to an existing template. It can be a JObject or - * well-formed JSON string. Use either the templateLink property or the template property, but not both.. - * - * @param template The template content. You use this element when you want to pass the template syntax - * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON - * string. Use either the templateLink property or the template property, but not both. - * @return the next definition stage. - */ - WithCreate withTemplate(Map template); - } - - /** - * The stage of the DeploymentStack definition allowing to specify templateLink. - */ - interface WithTemplateLink { - /** - * Specifies the templateLink property: The URI of the template. Use either the templateLink property or the - * template property, but not both.. - * - * @param templateLink The URI of the template. Use either the templateLink property or the template - * property, but not both. - * @return the next definition stage. - */ - WithCreate withTemplateLink(DeploymentStacksTemplateLink templateLink); - } - - /** - * The stage of the DeploymentStack definition allowing to specify parameters. - */ - interface WithParameters { - /** - * Specifies the parameters property: Name and value pairs that define the deployment parameters for the - * template. Use this element when providing the parameter values directly in the request, rather than - * linking to an existing parameter file. Use either the parametersLink property or the parameters property, - * but not both.. - * - * @param parameters Name and value pairs that define the deployment parameters for the template. Use this - * element when providing the parameter values directly in the request, rather than linking to an existing - * parameter file. Use either the parametersLink property or the parameters property, but not both. - * @return the next definition stage. - */ - WithCreate withParameters(Map parameters); - } - - /** - * The stage of the DeploymentStack definition allowing to specify parametersLink. - */ - interface WithParametersLink { - /** - * Specifies the parametersLink property: The URI of parameters file. Use this element to link to an - * existing parameters file. Use either the parametersLink property or the parameters property, but not - * both.. - * - * @param parametersLink The URI of parameters file. Use this element to link to an existing parameters - * file. Use either the parametersLink property or the parameters property, but not both. - * @return the next definition stage. - */ - WithCreate withParametersLink(DeploymentStacksParametersLink parametersLink); - } - - /** - * The stage of the DeploymentStack definition allowing to specify extensionConfigs. - */ - interface WithExtensionConfigs { - /** - * Specifies the extensionConfigs property: The deployment extension configs. Keys of this object are - * extension aliases as defined in the deployment template.. - * - * @param extensionConfigs The deployment extension configs. Keys of this object are extension aliases as - * defined in the deployment template. - * @return the next definition stage. - */ - WithCreate withExtensionConfigs(Map extensionConfigs); - } - - /** - * The stage of the DeploymentStack definition allowing to specify externalInputs. - */ - interface WithExternalInputs { - /** - * Specifies the externalInputs property: External input values, used by external tooling for parameter - * evaluation.. - * - * @param externalInputs External input values, used by external tooling for parameter evaluation. - * @return the next definition stage. - */ - WithCreate withExternalInputs(Map externalInputs); - } - - /** - * The stage of the DeploymentStack definition allowing to specify externalInputDefinitions. - */ - interface WithExternalInputDefinitions { - /** - * Specifies the externalInputDefinitions property: External input definitions, used by external tooling to - * define expected external input values.. - * - * @param externalInputDefinitions External input definitions, used by external tooling to define expected - * external input values. - * @return the next definition stage. - */ - WithCreate - withExternalInputDefinitions(Map externalInputDefinitions); - } - - /** - * The stage of the DeploymentStack definition allowing to specify actionOnUnmanage. - */ - interface WithActionOnUnmanage { - /** - * Specifies the actionOnUnmanage property: Defines the behavior of resources that are no longer managed - * after the Deployment stack is updated or deleted.. - * - * @param actionOnUnmanage Defines the behavior of resources that are no longer managed after the Deployment - * stack is updated or deleted. - * @return the next definition stage. - */ - WithCreate withActionOnUnmanage(ActionOnUnmanage actionOnUnmanage); - } - - /** - * The stage of the DeploymentStack definition allowing to specify debugSetting. - */ - interface WithDebugSetting { - /** - * Specifies the debugSetting property: The debug setting of the deployment.. - * - * @param debugSetting The debug setting of the deployment. - * @return the next definition stage. - */ - WithCreate withDebugSetting(DeploymentStacksDebugSetting debugSetting); - } - - /** - * The stage of the DeploymentStack definition allowing to specify deploymentScope. - */ - interface WithDeploymentScope { - /** - * Specifies the deploymentScope property: The scope at which the initial deployment should be created. If a - * scope is not specified, it will default to the scope of the deployment stack. Valid scopes are: - * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), - * subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').. - * - * @param deploymentScope The scope at which the initial deployment should be created. If a scope is not - * specified, it will default to the scope of the deployment stack. Valid scopes are: management group - * (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: - * '/subscriptions/{subscriptionId}'), resource group (format: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). - * @return the next definition stage. - */ - WithCreate withDeploymentScope(String deploymentScope); - } - - /** - * The stage of the DeploymentStack definition allowing to specify description. - */ - interface WithDescription { - /** - * Specifies the description property: Deployment stack description. Max length of 4096 characters.. - * - * @param description Deployment stack description. Max length of 4096 characters. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - - /** - * The stage of the DeploymentStack definition allowing to specify denySettings. - */ - interface WithDenySettings { - /** - * Specifies the denySettings property: Defines how resources deployed by the stack are locked.. - * - * @param denySettings Defines how resources deployed by the stack are locked. - * @return the next definition stage. - */ - WithCreate withDenySettings(DenySettings denySettings); - } - - /** - * The stage of the DeploymentStack definition allowing to specify validationLevel. - */ - interface WithValidationLevel { - /** - * Specifies the validationLevel property: The validation level of the deployment stack. - * - * @param validationLevel The validation level of the deployment stack. - * @return the next definition stage. - */ - WithCreate withValidationLevel(ValidationLevel validationLevel); - } - - /** - * The stage of the DeploymentStack definition allowing to specify bypassStackOutOfSyncError. + * The stage of the DeploymentStack definition allowing to specify properties. */ - interface WithBypassStackOutOfSyncError { + interface WithProperties { /** - * Specifies the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack - * resource list is not correctly synchronized.. + * Specifies the properties property: Deployment stack properties.. * - * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is - * not correctly synchronized. + * @param properties Deployment stack properties. * @return the next definition stage. */ - WithCreate withBypassStackOutOfSyncError(Boolean bypassStackOutOfSyncError); + WithCreate withProperties(DeploymentStackProperties properties); } } @@ -616,12 +205,7 @@ interface WithBypassStackOutOfSyncError { /** * The template for DeploymentStack update. */ - interface Update - extends UpdateStages.WithTags, UpdateStages.WithError, UpdateStages.WithTemplate, UpdateStages.WithTemplateLink, - UpdateStages.WithParameters, UpdateStages.WithParametersLink, UpdateStages.WithExtensionConfigs, - UpdateStages.WithExternalInputs, UpdateStages.WithExternalInputDefinitions, UpdateStages.WithActionOnUnmanage, - UpdateStages.WithDebugSetting, UpdateStages.WithDeploymentScope, UpdateStages.WithDescription, - UpdateStages.WithDenySettings, UpdateStages.WithValidationLevel, UpdateStages.WithBypassStackOutOfSyncError { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -656,230 +240,16 @@ interface WithTags { } /** - * The stage of the DeploymentStack update allowing to specify error. - */ - interface WithError { - /** - * Specifies the error property: The error detail.. - * - * @param error The error detail. - * @return the next definition stage. - */ - Update withError(ManagementError error); - } - - /** - * The stage of the DeploymentStack update allowing to specify template. - */ - interface WithTemplate { - /** - * Specifies the template property: The template content. You use this element when you want to pass the - * template syntax directly in the request rather than link to an existing template. It can be a JObject or - * well-formed JSON string. Use either the templateLink property or the template property, but not both.. - * - * @param template The template content. You use this element when you want to pass the template syntax - * directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON - * string. Use either the templateLink property or the template property, but not both. - * @return the next definition stage. - */ - Update withTemplate(Map template); - } - - /** - * The stage of the DeploymentStack update allowing to specify templateLink. - */ - interface WithTemplateLink { - /** - * Specifies the templateLink property: The URI of the template. Use either the templateLink property or the - * template property, but not both.. - * - * @param templateLink The URI of the template. Use either the templateLink property or the template - * property, but not both. - * @return the next definition stage. - */ - Update withTemplateLink(DeploymentStacksTemplateLink templateLink); - } - - /** - * The stage of the DeploymentStack update allowing to specify parameters. - */ - interface WithParameters { - /** - * Specifies the parameters property: Name and value pairs that define the deployment parameters for the - * template. Use this element when providing the parameter values directly in the request, rather than - * linking to an existing parameter file. Use either the parametersLink property or the parameters property, - * but not both.. - * - * @param parameters Name and value pairs that define the deployment parameters for the template. Use this - * element when providing the parameter values directly in the request, rather than linking to an existing - * parameter file. Use either the parametersLink property or the parameters property, but not both. - * @return the next definition stage. - */ - Update withParameters(Map parameters); - } - - /** - * The stage of the DeploymentStack update allowing to specify parametersLink. - */ - interface WithParametersLink { - /** - * Specifies the parametersLink property: The URI of parameters file. Use this element to link to an - * existing parameters file. Use either the parametersLink property or the parameters property, but not - * both.. - * - * @param parametersLink The URI of parameters file. Use this element to link to an existing parameters - * file. Use either the parametersLink property or the parameters property, but not both. - * @return the next definition stage. - */ - Update withParametersLink(DeploymentStacksParametersLink parametersLink); - } - - /** - * The stage of the DeploymentStack update allowing to specify extensionConfigs. - */ - interface WithExtensionConfigs { - /** - * Specifies the extensionConfigs property: The deployment extension configs. Keys of this object are - * extension aliases as defined in the deployment template.. - * - * @param extensionConfigs The deployment extension configs. Keys of this object are extension aliases as - * defined in the deployment template. - * @return the next definition stage. - */ - Update withExtensionConfigs(Map extensionConfigs); - } - - /** - * The stage of the DeploymentStack update allowing to specify externalInputs. - */ - interface WithExternalInputs { - /** - * Specifies the externalInputs property: External input values, used by external tooling for parameter - * evaluation.. - * - * @param externalInputs External input values, used by external tooling for parameter evaluation. - * @return the next definition stage. - */ - Update withExternalInputs(Map externalInputs); - } - - /** - * The stage of the DeploymentStack update allowing to specify externalInputDefinitions. - */ - interface WithExternalInputDefinitions { - /** - * Specifies the externalInputDefinitions property: External input definitions, used by external tooling to - * define expected external input values.. - * - * @param externalInputDefinitions External input definitions, used by external tooling to define expected - * external input values. - * @return the next definition stage. - */ - Update - withExternalInputDefinitions(Map externalInputDefinitions); - } - - /** - * The stage of the DeploymentStack update allowing to specify actionOnUnmanage. - */ - interface WithActionOnUnmanage { - /** - * Specifies the actionOnUnmanage property: Defines the behavior of resources that are no longer managed - * after the Deployment stack is updated or deleted.. - * - * @param actionOnUnmanage Defines the behavior of resources that are no longer managed after the Deployment - * stack is updated or deleted. - * @return the next definition stage. - */ - Update withActionOnUnmanage(ActionOnUnmanage actionOnUnmanage); - } - - /** - * The stage of the DeploymentStack update allowing to specify debugSetting. - */ - interface WithDebugSetting { - /** - * Specifies the debugSetting property: The debug setting of the deployment.. - * - * @param debugSetting The debug setting of the deployment. - * @return the next definition stage. - */ - Update withDebugSetting(DeploymentStacksDebugSetting debugSetting); - } - - /** - * The stage of the DeploymentStack update allowing to specify deploymentScope. - */ - interface WithDeploymentScope { - /** - * Specifies the deploymentScope property: The scope at which the initial deployment should be created. If a - * scope is not specified, it will default to the scope of the deployment stack. Valid scopes are: - * management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), - * subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').. - * - * @param deploymentScope The scope at which the initial deployment should be created. If a scope is not - * specified, it will default to the scope of the deployment stack. Valid scopes are: management group - * (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: - * '/subscriptions/{subscriptionId}'), resource group (format: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). - * @return the next definition stage. - */ - Update withDeploymentScope(String deploymentScope); - } - - /** - * The stage of the DeploymentStack update allowing to specify description. - */ - interface WithDescription { - /** - * Specifies the description property: Deployment stack description. Max length of 4096 characters.. - * - * @param description Deployment stack description. Max length of 4096 characters. - * @return the next definition stage. - */ - Update withDescription(String description); - } - - /** - * The stage of the DeploymentStack update allowing to specify denySettings. - */ - interface WithDenySettings { - /** - * Specifies the denySettings property: Defines how resources deployed by the stack are locked.. - * - * @param denySettings Defines how resources deployed by the stack are locked. - * @return the next definition stage. - */ - Update withDenySettings(DenySettings denySettings); - } - - /** - * The stage of the DeploymentStack update allowing to specify validationLevel. - */ - interface WithValidationLevel { - /** - * Specifies the validationLevel property: The validation level of the deployment stack. - * - * @param validationLevel The validation level of the deployment stack. - * @return the next definition stage. - */ - Update withValidationLevel(ValidationLevel validationLevel); - } - - /** - * The stage of the DeploymentStack update allowing to specify bypassStackOutOfSyncError. + * The stage of the DeploymentStack update allowing to specify properties. */ - interface WithBypassStackOutOfSyncError { + interface WithProperties { /** - * Specifies the bypassStackOutOfSyncError property: Flag to bypass service errors that indicate the stack - * resource list is not correctly synchronized.. + * Specifies the properties property: Deployment stack properties.. * - * @param bypassStackOutOfSyncError Flag to bypass service errors that indicate the stack resource list is - * not correctly synchronized. + * @param properties Deployment stack properties. * @return the next definition stage. */ - Update withBypassStackOutOfSyncError(Boolean bypassStackOutOfSyncError); + Update withProperties(DeploymentStackProperties properties); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackProperties.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProperties.java similarity index 92% rename from sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackProperties.java rename to sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProperties.java index f92bfb00a006..a0c710b48dff 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackProperties.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProperties.java @@ -2,30 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.resources.deploymentstacks.fluent.models; +package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; -import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtension; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInput; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInputDefinition; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProvisioningState; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDebugSetting; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksParametersLink; -import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; -import com.azure.resourcemanager.resources.deploymentstacks.models.ManagedResourceReference; -import com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReference; -import com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReferenceExtended; -import com.azure.resourcemanager.resources.deploymentstacks.models.ValidationLevel; import java.io.IOException; import java.util.List; import java.util.Map; @@ -45,7 +29,7 @@ public final class DeploymentStackProperties implements JsonSerializable template; + private Object template; /* * The URI of the template. Use either the templateLink property or the template property, but not both. @@ -168,7 +152,7 @@ public final class DeploymentStackProperties implements JsonSerializable outputs; + private Object outputs; /* * The duration of the last successful Deployment stack update. @@ -208,7 +192,7 @@ public DeploymentStackProperties withError(ManagementError error) { * * @return the template value. */ - public Map template() { + public Object template() { return this.template; } @@ -220,7 +204,7 @@ public Map template() { * @param template the template value to set. * @return the DeploymentStackProperties object itself. */ - public DeploymentStackProperties withTemplate(Map template) { + public DeploymentStackProperties withTemplate(Object template) { this.template = template; return this; } @@ -594,7 +578,7 @@ public String deploymentId() { * * @return the outputs value. */ - public Map outputs() { + public Object outputs() { return this.outputs; } @@ -616,8 +600,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("actionOnUnmanage", this.actionOnUnmanage); jsonWriter.writeJsonField("denySettings", this.denySettings); jsonWriter.writeJsonField("error", this.error); - jsonWriter.writeMapField("template", this.template, - (writer, element) -> writer.writeUntyped(element == null ? null : element.toObject(Object.class))); + if (this.template != null) { + jsonWriter.writeUntypedField("template", this.template); + } jsonWriter.writeJsonField("templateLink", this.templateLink); jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("parametersLink", this.parametersLink); @@ -658,9 +643,7 @@ public static DeploymentStackProperties fromJson(JsonReader jsonReader) throws I } else if ("error".equals(fieldName)) { deserializedDeploymentStackProperties.error = ManagementError.fromJson(reader); } else if ("template".equals(fieldName)) { - Map template = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); - deserializedDeploymentStackProperties.template = template; + deserializedDeploymentStackProperties.template = reader.readUntyped(); } else if ("templateLink".equals(fieldName)) { deserializedDeploymentStackProperties.templateLink = DeploymentStacksTemplateLink.fromJson(reader); } else if ("parameters".equals(fieldName)) { @@ -722,9 +705,7 @@ public static DeploymentStackProperties fromJson(JsonReader jsonReader) throws I } else if ("deploymentId".equals(fieldName)) { deserializedDeploymentStackProperties.deploymentId = reader.getString(); } else if ("outputs".equals(fieldName)) { - Map outputs = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); - deserializedDeploymentStackProperties.outputs = outputs; + deserializedDeploymentStackProperties.outputs = reader.readUntyped(); } else if ("duration".equals(fieldName)) { deserializedDeploymentStackProperties.duration = reader.getString(); } else { diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackTemplateDefinition.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackTemplateDefinition.java index b56716e8de1d..5b74a33dc00e 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackTemplateDefinition.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackTemplateDefinition.java @@ -4,9 +4,7 @@ package com.azure.resourcemanager.resources.deploymentstacks.models; -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackTemplateDefinitionInner; -import java.util.Map; /** * An immutable client-side representation of DeploymentStackTemplateDefinition. @@ -19,7 +17,7 @@ public interface DeploymentStackTemplateDefinition { * * @return the template value. */ - Map template(); + Object template(); /** * Gets the templateLink property: The URI of the template. Use either the templateLink property or the template diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaRecord.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaRecord.java index 556b0e54a63d..5c45032e8e60 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaRecord.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaRecord.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -22,12 +21,12 @@ public final class DeploymentStacksChangeDeltaRecord implements JsonSerializable /* * The predicted value before the deployment is executed. */ - private Map before; + private Map before; /* * The predicted value after the deployment is executed. */ - private Map after; + private Map after; /* * The predicted changes to the properties." @@ -45,7 +44,7 @@ private DeploymentStacksChangeDeltaRecord() { * * @return the before value. */ - public Map before() { + public Map before() { return this.before; } @@ -54,7 +53,7 @@ public Map before() { * * @return the after value. */ - public Map after() { + public Map after() { return this.after; } @@ -73,10 +72,8 @@ public List delta() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("before", this.before, - (writer, element) -> writer.writeUntyped(element == null ? null : element.toObject(Object.class))); - jsonWriter.writeMapField("after", this.after, - (writer, element) -> writer.writeUntyped(element == null ? null : element.toObject(Object.class))); + jsonWriter.writeMapField("before", this.before, (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeMapField("after", this.after, (writer, element) -> writer.writeUntyped(element)); jsonWriter.writeArrayField("delta", this.delta, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -98,12 +95,10 @@ public static DeploymentStacksChangeDeltaRecord fromJson(JsonReader jsonReader) reader.nextToken(); if ("before".equals(fieldName)) { - Map before = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + Map before = reader.readMap(reader1 -> reader1.readUntyped()); deserializedDeploymentStacksChangeDeltaRecord.before = before; } else if ("after".equals(fieldName)) { - Map after = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + Map after = reader.readMap(reader1 -> reader1.readUntyped()); deserializedDeploymentStacksChangeDeltaRecord.after = after; } else if ("delta".equals(fieldName)) { List delta diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChange.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChange.java index 0fb8b81baf3b..4fbf3401d090 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChange.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChange.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -22,12 +21,12 @@ public final class DeploymentStacksWhatIfPropertyChange /* * The predicted value before the deployment is executed. */ - private BinaryData before; + private Object before; /* * The predicted value after the deployment is executed. */ - private BinaryData after; + private Object after; /* * Type of change that will be made to the resource when the deployment is executed. @@ -55,7 +54,7 @@ private DeploymentStacksWhatIfPropertyChange() { * * @return the before value. */ - public BinaryData before() { + public Object before() { return this.before; } @@ -64,7 +63,7 @@ public BinaryData before() { * * @return the after value. */ - public BinaryData after() { + public Object after() { return this.after; } @@ -104,12 +103,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("path", this.path); jsonWriter.writeStringField("changeType", this.changeType == null ? null : this.changeType.toString()); if (this.before != null) { - jsonWriter.writeFieldName("before"); - this.before.writeTo(jsonWriter); + jsonWriter.writeUntypedField("before", this.before); } if (this.after != null) { - jsonWriter.writeFieldName("after"); - this.after.writeTo(jsonWriter); + jsonWriter.writeUntypedField("after", this.after); } jsonWriter.writeArrayField("children", this.children, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); @@ -138,11 +135,9 @@ public static DeploymentStacksWhatIfPropertyChange fromJson(JsonReader jsonReade deserializedDeploymentStacksWhatIfPropertyChange.changeType = DeploymentStacksWhatIfPropertyChangeType.fromString(reader.getString()); } else if ("before".equals(fieldName)) { - deserializedDeploymentStacksWhatIfPropertyChange.before - = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + deserializedDeploymentStacksWhatIfPropertyChange.before = reader.readUntyped(); } else if ("after".equals(fieldName)) { - deserializedDeploymentStacksWhatIfPropertyChange.after - = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + deserializedDeploymentStacksWhatIfPropertyChange.after = reader.readUntyped(); } else if ("children".equals(fieldName)) { List children = reader.readArray(reader1 -> DeploymentStacksWhatIfPropertyChange.fromJson(reader1)); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResourceChange.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResourceChange.java index 4d339e38d1b0..3f1b3d13e119 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResourceChange.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResourceChange.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -37,7 +36,7 @@ public final class DeploymentStacksWhatIfResourceChange /* * The extensible resource identifiers. */ - private Map identifiers; + private Map identifiers; /* * The API version the resource was deployed with @@ -122,7 +121,7 @@ public String type() { * * @return the identifiers value. */ - public Map identifiers() { + public Map identifiers() { return this.identifiers; } @@ -256,8 +255,7 @@ public static DeploymentStacksWhatIfResourceChange fromJson(JsonReader jsonReade } else if ("type".equals(fieldName)) { deserializedDeploymentStacksWhatIfResourceChange.type = reader.getString(); } else if ("identifiers".equals(fieldName)) { - Map identifiers = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + Map identifiers = reader.readMap(reader1 -> reader1.readUntyped()); deserializedDeploymentStacksWhatIfResourceChange.identifiers = identifiers; } else if ("apiVersion".equals(fieldName)) { deserializedDeploymentStacksWhatIfResourceChange.apiVersion = reader.getString(); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultProperties.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultProperties.java index 4b143751c507..7f3d0c2249c9 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultProperties.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultProperties.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.BinaryData; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -34,7 +33,7 @@ public final class DeploymentStacksWhatIfResultProperties * rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the * templateLink property or the template property, but not both. */ - private Map template; + private Map template; /* * The URI of the template. Use either the templateLink property or the template property, but not both. @@ -174,7 +173,7 @@ public DeploymentStacksWhatIfResultProperties withError(ManagementError error) { * * @return the template value. */ - public Map template() { + public Map template() { return this.template; } @@ -186,7 +185,7 @@ public Map template() { * @param template the template value to set. * @return the DeploymentStacksWhatIfResultProperties object itself. */ - public DeploymentStacksWhatIfResultProperties withTemplate(Map template) { + public DeploymentStacksWhatIfResultProperties withTemplate(Map template) { this.template = template; return this; } @@ -556,8 +555,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("deploymentStackResourceId", this.deploymentStackResourceId); jsonWriter.writeStringField("retentionInterval", CoreUtils.durationToStringWithDays(this.retentionInterval)); jsonWriter.writeJsonField("error", this.error); - jsonWriter.writeMapField("template", this.template, - (writer, element) -> writer.writeUntyped(element == null ? null : element.toObject(Object.class))); + jsonWriter.writeMapField("template", this.template, (writer, element) -> writer.writeUntyped(element)); jsonWriter.writeJsonField("templateLink", this.templateLink); jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("parametersLink", this.parametersLink); @@ -604,8 +602,7 @@ public static DeploymentStacksWhatIfResultProperties fromJson(JsonReader jsonRea } else if ("error".equals(fieldName)) { deserializedDeploymentStacksWhatIfResultProperties.error = ManagementError.fromJson(reader); } else if ("template".equals(fieldName)) { - Map template = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + Map template = reader.readMap(reader1 -> reader1.readUntyped()); deserializedDeploymentStacksWhatIfResultProperties.template = template; } else if ("templateLink".equals(fieldName)) { deserializedDeploymentStacksWhatIfResultProperties.templateLink diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ErrorAdditionalInfo.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ErrorAdditionalInfo.java index 1bbd5368428a..1729e2a2caaf 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ErrorAdditionalInfo.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ErrorAdditionalInfo.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -25,7 +24,7 @@ public final class ErrorAdditionalInfo implements JsonSerializable BinaryData.fromObject(nonNullReader.readUntyped())); + deserializedErrorAdditionalInfo.info = reader.readUntyped(); } else { reader.skipChildren(); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ManagedResourceReference.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ManagedResourceReference.java index ec793f4b198f..eaf9303db78e 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ManagedResourceReference.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ManagedResourceReference.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -35,7 +34,7 @@ public final class ManagedResourceReference extends ResourceReference { /* * The extensible resource identifiers. */ - private Map identifiers; + private Map identifiers; /* * The resource type. @@ -92,7 +91,7 @@ public String apiVersion() { * @return the identifiers value. */ @Override - public Map identifiers() { + public Map identifiers() { return this.identifiers; } @@ -159,8 +158,7 @@ public static ManagedResourceReference fromJson(JsonReader jsonReader) throws IO } else if ("type".equals(fieldName)) { deserializedManagedResourceReference.type = reader.getString(); } else if ("identifiers".equals(fieldName)) { - Map identifiers = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + Map identifiers = reader.readMap(reader1 -> reader1.readUntyped()); deserializedManagedResourceReference.identifiers = identifiers; } else if ("apiVersion".equals(fieldName)) { deserializedManagedResourceReference.apiVersion = reader.getString(); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReference.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReference.java index 52702ccdd8b8..f2655d9c266f 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReference.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReference.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -36,7 +35,7 @@ public class ResourceReference implements JsonSerializable { /* * The extensible resource identifiers. */ - private Map identifiers; + private Map identifiers; /* * The API version the resource was deployed with @@ -114,7 +113,7 @@ ResourceReference withType(String type) { * * @return the identifiers value. */ - public Map identifiers() { + public Map identifiers() { return this.identifiers; } @@ -124,7 +123,7 @@ public Map identifiers() { * @param identifiers the identifiers value to set. * @return the ResourceReference object itself. */ - ResourceReference withIdentifiers(Map identifiers) { + ResourceReference withIdentifiers(Map identifiers) { this.identifiers = identifiers; return this; } @@ -180,8 +179,7 @@ public static ResourceReference fromJson(JsonReader jsonReader) throws IOExcepti } else if ("type".equals(fieldName)) { deserializedResourceReference.type = reader.getString(); } else if ("identifiers".equals(fieldName)) { - Map identifiers = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + Map identifiers = reader.readMap(reader1 -> reader1.readUntyped()); deserializedResourceReference.identifiers = identifiers; } else if ("apiVersion".equals(fieldName)) { deserializedResourceReference.apiVersion = reader.getString(); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReferenceExtended.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReferenceExtended.java index 83ab82ded2fd..277958014466 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReferenceExtended.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReferenceExtended.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -37,7 +36,7 @@ public final class ResourceReferenceExtended implements JsonSerializable identifiers; + private Map identifiers; /* * The API version the resource was deployed with @@ -87,7 +86,7 @@ public String type() { * * @return the identifiers value. */ - public Map identifiers() { + public Map identifiers() { return this.identifiers; } @@ -141,8 +140,7 @@ public static ResourceReferenceExtended fromJson(JsonReader jsonReader) throws I } else if ("type".equals(fieldName)) { deserializedResourceReferenceExtended.type = reader.getString(); } else if ("identifiers".equals(fieldName)) { - Map identifiers = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + Map identifiers = reader.readMap(reader1 -> reader1.readUntyped()); deserializedResourceReferenceExtended.identifiers = identifiers; } else if ("apiVersion".equals(fieldName)) { deserializedResourceReferenceExtended.apiVersion = reader.getString(); diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_apiview_properties.json b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_apiview_properties.json index 74d328b78126..46886ccae165 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_apiview_properties.json +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_apiview_properties.json @@ -67,7 +67,6 @@ "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.list": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.list", "com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.whatIf": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.whatIf", "com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner": "Microsoft.Resources.DeploymentStacks.DeploymentStack", - "com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackProperties": "Microsoft.Resources.DeploymentStacks.DeploymentStackProperties", "com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackTemplateDefinitionInner": "Microsoft.Resources.DeploymentStacks.DeploymentStackTemplateDefinition", "com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackValidateResultInner": "Microsoft.Resources.DeploymentStacks.DeploymentStackValidateResult", "com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner": "Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResult", @@ -84,6 +83,7 @@ "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInput": "Microsoft.Resources.DeploymentStacks.DeploymentExternalInput", "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInputDefinition": "Microsoft.Resources.DeploymentStacks.DeploymentExternalInputDefinition", "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter": "Microsoft.Resources.DeploymentStacks.DeploymentParameter", + "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties": "Microsoft.Resources.DeploymentStacks.DeploymentStackProperties", "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProvisioningState": "Microsoft.Resources.DeploymentStacks.DeploymentStackProvisioningState", "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackValidateProperties": "Microsoft.Resources.DeploymentStacks.DeploymentStackValidateProperties", "com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBase": "Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeBase", diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_metadata.json b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_metadata.json index 9ecf3e969b4c..bdb2432591f4 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_metadata.json +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/main/resources/META-INF/azure-resourcemanager-resources-deploymentstacks_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"2025-07-01","crossLanguageDefinitions":{"com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient":"Microsoft.Resources.DeploymentStacks","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginCreateOrUpdateAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginCreateOrUpdateAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginCreateOrUpdateAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginDelete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginDeleteAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginDeleteAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginValidateStackAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginValidateStackAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginValidateStackAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.createOrUpdateAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.createOrUpdateAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.createOrUpdateAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.delete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.deleteAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.deleteAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtManagementGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtResourceGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtSubscriptionWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtManagementGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtSubscriptionWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getByResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getByResourceGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.list":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.listAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.listByResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.validateStackAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.validateStackAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.validateStackAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksManagementClient":"Microsoft.Resources.DeploymentStacks","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.beginCreateOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.beginWhatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.createOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.delete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.deleteWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.get":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.getWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.list":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.whatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.beginCreateOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.beginWhatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.createOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.delete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.deleteWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.getByResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.getByResourceGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.listByResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.whatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.beginCreateOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.beginWhatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.createOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.delete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.deleteWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.get":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.getWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.list":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.whatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner":"Microsoft.Resources.DeploymentStacks.DeploymentStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackProperties":"Microsoft.Resources.DeploymentStacks.DeploymentStackProperties","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackTemplateDefinitionInner":"Microsoft.Resources.DeploymentStacks.DeploymentStackTemplateDefinition","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackValidateResultInner":"Microsoft.Resources.DeploymentStacks.DeploymentStackValidateResult","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResult","com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksManagementClientBuilder":"Microsoft.Resources.DeploymentStacks","com.azure.resourcemanager.resources.deploymentstacks.implementation.models.DeploymentStackListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.resources.deploymentstacks.implementation.models.DeploymentStacksWhatIfResultListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage":"Microsoft.Resources.DeploymentStacks.ActionOnUnmanage","com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings":"Microsoft.Resources.DeploymentStacks.DenySettings","com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode":"Microsoft.Resources.DeploymentStacks.DenySettingsMode","com.azure.resourcemanager.resources.deploymentstacks.models.DenyStatusMode":"Microsoft.Resources.DeploymentStacks.DenyStatusMode","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtension":"Microsoft.Resources.DeploymentStacks.DeploymentExtension","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig":"Microsoft.Resources.DeploymentStacks.DeploymentExtensionConfig","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem":"Microsoft.Resources.DeploymentStacks.DeploymentExtensionConfigItem","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInput":"Microsoft.Resources.DeploymentStacks.DeploymentExternalInput","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInputDefinition":"Microsoft.Resources.DeploymentStacks.DeploymentExternalInputDefinition","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter":"Microsoft.Resources.DeploymentStacks.DeploymentParameter","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProvisioningState":"Microsoft.Resources.DeploymentStacks.DeploymentStackProvisioningState","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackValidateProperties":"Microsoft.Resources.DeploymentStacks.DeploymentStackValidateProperties","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBase":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeBase","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBaseDenyStatusMode":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeBase","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBaseDeploymentStacksManagementStatus":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeBase","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeDeltaDenySettings":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeDelta","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeDeltaRecord":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeDelta","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDebugSetting":"Microsoft.Resources.DeploymentStacks.DeploymentStacksDebugSetting","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum":"Microsoft.Resources.DeploymentStacks.DeploymentStacksDeleteDetachEnum","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDiagnostic":"Microsoft.Resources.DeploymentStacks.DeploymentStacksDiagnostic","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDiagnosticLevel":"Microsoft.Resources.DeploymentStacks.DeploymentStacksDiagnosticLevel","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksManagementStatus":"Microsoft.Resources.DeploymentStacks.DeploymentStacksManagementStatus","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksParametersLink":"Microsoft.Resources.DeploymentStacks.DeploymentStacksParametersLink","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum":"Microsoft.Resources.DeploymentStacks.DeploymentStacksResourcesWithoutDeleteSupportEnum","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink":"Microsoft.Resources.DeploymentStacks.DeploymentStacksTemplateLink","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChange":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfChange","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChangeCertainty":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfChangeCertainty","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChangeType":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfChangeType","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfPropertyChange":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfPropertyChange","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfPropertyChangeType":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfPropertyChangeType","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResourceChange":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResourceChange","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultProperties","com.azure.resourcemanager.resources.deploymentstacks.models.ErrorAdditionalInfo":"Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo","com.azure.resourcemanager.resources.deploymentstacks.models.KeyVaultParameterReference":"Microsoft.Resources.DeploymentStacks.KeyVaultParameterReference","com.azure.resourcemanager.resources.deploymentstacks.models.KeyVaultReference":"Microsoft.Resources.DeploymentStacks.KeyVaultReference","com.azure.resourcemanager.resources.deploymentstacks.models.ManagedResourceReference":"Microsoft.Resources.DeploymentStacks.ManagedResourceReference","com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReference":"Microsoft.Resources.DeploymentStacks.ResourceReference","com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReferenceExtended":"Microsoft.Resources.DeploymentStacks.ResourceReferenceExtended","com.azure.resourcemanager.resources.deploymentstacks.models.ResourceStatusMode":"Microsoft.Resources.DeploymentStacks.ResourceStatusMode","com.azure.resourcemanager.resources.deploymentstacks.models.ValidationLevel":"Microsoft.Resources.DeploymentStacks.ValidationLevel"},"generatedFiles":["src/main/java/com/azure/resourcemanager/resources/deploymentstacks/DeploymentStacksManager.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksManagementClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtManagementGroupsClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtResourceGroupsClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackInner.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackProperties.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackTemplateDefinitionInner.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackValidateResultInner.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStacksWhatIfResultInner.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/package-info.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackTemplateDefinitionImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackValidateResultImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/models/DeploymentStackListResult.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/models/DeploymentStacksWhatIfResultListResult.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/package-info.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ActionOnUnmanage.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettings.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettingsMode.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenyStatusMode.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtension.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfig.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfigItem.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInput.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInputDefinition.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentParameter.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStack.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProvisioningState.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackTemplateDefinition.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateProperties.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateResult.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacks.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBase.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDenyStatusMode.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDeploymentStacksManagementStatus.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaDenySettings.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaRecord.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDebugSetting.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDeleteDetachEnum.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnostic.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnosticLevel.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksManagementStatus.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksParametersLink.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksResourcesWithoutDeleteSupportEnum.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksTemplateLink.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChange.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeCertainty.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeType.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChange.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChangeType.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResourceChange.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResult.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultProperties.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtManagementGroups.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtResourceGroups.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtSubscriptions.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ErrorAdditionalInfo.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultParameterReference.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultReference.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ManagedResourceReference.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReference.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReferenceExtended.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceStatusMode.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ValidationLevel.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/package-info.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2025-07-01","crossLanguageDefinitions":{"com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient":"Microsoft.Resources.DeploymentStacks","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginCreateOrUpdateAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginCreateOrUpdateAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginCreateOrUpdateAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginDelete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginDeleteAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginDeleteAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginValidateStackAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginValidateStackAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.beginValidateStackAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.createOrUpdateAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.createOrUpdateAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.createOrUpdateAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.delete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.deleteAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.deleteAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtManagementGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtResourceGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.exportTemplateAtSubscriptionWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.exportTemplate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtManagementGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getAtSubscriptionWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getByResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.getByResourceGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.list":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.listAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.listByResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.validateStackAtManagementGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtManagementGroup.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.validateStackAtResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtResourceGroup.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksClient.validateStackAtSubscription":"Microsoft.Resources.DeploymentStacks.DeploymentStacksAtSubscription.validateStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksManagementClient":"Microsoft.Resources.DeploymentStacks","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.beginCreateOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.beginWhatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.createOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.delete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.deleteWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.get":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.getWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.list":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtManagementGroupsClient.whatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtManagementGroup.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.beginCreateOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.beginWhatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.createOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.delete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.deleteWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.getByResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.getByResourceGroupWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.listByResourceGroup":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtResourceGroupsClient.whatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtResourceGroup.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.beginCreateOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.beginWhatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.createOrUpdate":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.createOrUpdate","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.delete":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.deleteWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.delete","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.get":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.getWithResponse":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.get","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.list":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.list","com.azure.resourcemanager.resources.deploymentstacks.fluent.DeploymentStacksWhatIfResultsAtSubscriptionsClient.whatIf":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultsAtSubscription.whatIf","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner":"Microsoft.Resources.DeploymentStacks.DeploymentStack","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackTemplateDefinitionInner":"Microsoft.Resources.DeploymentStacks.DeploymentStackTemplateDefinition","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackValidateResultInner":"Microsoft.Resources.DeploymentStacks.DeploymentStackValidateResult","com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResult","com.azure.resourcemanager.resources.deploymentstacks.implementation.DeploymentStacksManagementClientBuilder":"Microsoft.Resources.DeploymentStacks","com.azure.resourcemanager.resources.deploymentstacks.implementation.models.DeploymentStackListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.resources.deploymentstacks.implementation.models.DeploymentStacksWhatIfResultListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage":"Microsoft.Resources.DeploymentStacks.ActionOnUnmanage","com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings":"Microsoft.Resources.DeploymentStacks.DenySettings","com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode":"Microsoft.Resources.DeploymentStacks.DenySettingsMode","com.azure.resourcemanager.resources.deploymentstacks.models.DenyStatusMode":"Microsoft.Resources.DeploymentStacks.DenyStatusMode","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtension":"Microsoft.Resources.DeploymentStacks.DeploymentExtension","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig":"Microsoft.Resources.DeploymentStacks.DeploymentExtensionConfig","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem":"Microsoft.Resources.DeploymentStacks.DeploymentExtensionConfigItem","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInput":"Microsoft.Resources.DeploymentStacks.DeploymentExternalInput","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExternalInputDefinition":"Microsoft.Resources.DeploymentStacks.DeploymentExternalInputDefinition","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter":"Microsoft.Resources.DeploymentStacks.DeploymentParameter","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties":"Microsoft.Resources.DeploymentStacks.DeploymentStackProperties","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProvisioningState":"Microsoft.Resources.DeploymentStacks.DeploymentStackProvisioningState","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackValidateProperties":"Microsoft.Resources.DeploymentStacks.DeploymentStackValidateProperties","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBase":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeBase","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBaseDenyStatusMode":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeBase","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeBaseDeploymentStacksManagementStatus":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeBase","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeDeltaDenySettings":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeDelta","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksChangeDeltaRecord":"Microsoft.Resources.DeploymentStacks.DeploymentStacksChangeDelta","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDebugSetting":"Microsoft.Resources.DeploymentStacks.DeploymentStacksDebugSetting","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum":"Microsoft.Resources.DeploymentStacks.DeploymentStacksDeleteDetachEnum","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDiagnostic":"Microsoft.Resources.DeploymentStacks.DeploymentStacksDiagnostic","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDiagnosticLevel":"Microsoft.Resources.DeploymentStacks.DeploymentStacksDiagnosticLevel","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksManagementStatus":"Microsoft.Resources.DeploymentStacks.DeploymentStacksManagementStatus","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksParametersLink":"Microsoft.Resources.DeploymentStacks.DeploymentStacksParametersLink","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksResourcesWithoutDeleteSupportEnum":"Microsoft.Resources.DeploymentStacks.DeploymentStacksResourcesWithoutDeleteSupportEnum","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink":"Microsoft.Resources.DeploymentStacks.DeploymentStacksTemplateLink","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChange":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfChange","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChangeCertainty":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfChangeCertainty","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfChangeType":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfChangeType","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfPropertyChange":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfPropertyChange","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfPropertyChangeType":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfPropertyChangeType","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResourceChange":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResourceChange","com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties":"Microsoft.Resources.DeploymentStacks.DeploymentStacksWhatIfResultProperties","com.azure.resourcemanager.resources.deploymentstacks.models.ErrorAdditionalInfo":"Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo","com.azure.resourcemanager.resources.deploymentstacks.models.KeyVaultParameterReference":"Microsoft.Resources.DeploymentStacks.KeyVaultParameterReference","com.azure.resourcemanager.resources.deploymentstacks.models.KeyVaultReference":"Microsoft.Resources.DeploymentStacks.KeyVaultReference","com.azure.resourcemanager.resources.deploymentstacks.models.ManagedResourceReference":"Microsoft.Resources.DeploymentStacks.ManagedResourceReference","com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReference":"Microsoft.Resources.DeploymentStacks.ResourceReference","com.azure.resourcemanager.resources.deploymentstacks.models.ResourceReferenceExtended":"Microsoft.Resources.DeploymentStacks.ResourceReferenceExtended","com.azure.resourcemanager.resources.deploymentstacks.models.ResourceStatusMode":"Microsoft.Resources.DeploymentStacks.ResourceStatusMode","com.azure.resourcemanager.resources.deploymentstacks.models.ValidationLevel":"Microsoft.Resources.DeploymentStacks.ValidationLevel"},"generatedFiles":["src/main/java/com/azure/resourcemanager/resources/deploymentstacks/DeploymentStacksManager.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksManagementClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtManagementGroupsClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtResourceGroupsClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/DeploymentStacksWhatIfResultsAtSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackInner.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackTemplateDefinitionInner.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStackValidateResultInner.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/DeploymentStacksWhatIfResultInner.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/fluent/package-info.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackTemplateDefinitionImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStackValidateResultImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksManagementClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtManagementGroupsImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtResourceGroupsImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/DeploymentStacksWhatIfResultsAtSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/models/DeploymentStackListResult.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/models/DeploymentStacksWhatIfResultListResult.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/implementation/package-info.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ActionOnUnmanage.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettings.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenySettingsMode.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DenyStatusMode.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtension.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfig.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExtensionConfigItem.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInput.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentExternalInputDefinition.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentParameter.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStack.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProperties.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackProvisioningState.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackTemplateDefinition.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateProperties.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStackValidateResult.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacks.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBase.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDenyStatusMode.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeBaseDeploymentStacksManagementStatus.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaDenySettings.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksChangeDeltaRecord.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDebugSetting.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDeleteDetachEnum.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnostic.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksDiagnosticLevel.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksManagementStatus.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksParametersLink.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksResourcesWithoutDeleteSupportEnum.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksTemplateLink.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChange.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeCertainty.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfChangeType.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChange.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfPropertyChangeType.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResourceChange.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResult.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultProperties.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtManagementGroups.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtResourceGroups.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/DeploymentStacksWhatIfResultsAtSubscriptions.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ErrorAdditionalInfo.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultParameterReference.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/KeyVaultReference.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ManagedResourceReference.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReference.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceReferenceExtended.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ResourceStatusMode.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/ValidationLevel.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/models/package-info.java","src/main/java/com/azure/resourcemanager/resources/deploymentstacks/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java index a8451e1154aa..7833bf177f06 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtManagementGroupSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.generated; -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; @@ -12,8 +11,8 @@ import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; -import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -34,26 +33,23 @@ public static void createOrUpdateAManagementGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .createOrUpdateAtManagementGroup("myMg", "simpleDeploymentStack", - new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withParameters(mapOf("parameter1", - new DeploymentParameter() - .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) - .withExtensionConfigs( - mapOf("contoso", - new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", - new DeploymentExtensionConfigItem() - .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), - "configOne", - new DeploymentExtensionConfigItem().withValue( - BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), + new DeploymentStackInner() + .withProperties(new DeploymentStackProperties() + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties( + mapOf("configTwo", new DeploymentExtensionConfigItem().withValue(true), "configOne", + new DeploymentExtensionConfigItem().withValue("config1Value"))))) + .withActionOnUnmanage( + new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false))) + .withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java index 3827f92ac359..3e4990638620 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtResourceGroupSamples.java @@ -4,15 +4,14 @@ package com.azure.resourcemanager.resources.deploymentstacks.generated; -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; -import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -36,25 +35,19 @@ public static void createOrUpdateAResourceGroupDeploymentStack( .withExistingResourceGroup("deploymentStacksRG") .withRegion("eastus") .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withParameters(mapOf("parameter1", - new DeploymentParameter().withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) - .withExtensionConfigs( - mapOf("contoso", - new DeploymentExtensionConfig() - .withAdditionalProperties( - mapOf("configTwo", - new DeploymentExtensionConfigItem() - .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), - "configOne", - new DeploymentExtensionConfigItem().withValue( - BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)) + .withProperties(new DeploymentStackProperties() + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties( + mapOf("configTwo", new DeploymentExtensionConfigItem().withValue(true), "configOne", + new DeploymentExtensionConfigItem().withValue("config1Value"))))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false))) .create(); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java index fd74d2f86263..b2a72f7f4a01 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksCreateOrUpdateAtSubscriptionSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.generated; -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; @@ -12,8 +11,8 @@ import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfig; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentExtensionConfigItem; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; -import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -34,26 +33,23 @@ public static void createOrUpdateASubscriptionDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .createOrUpdateAtSubscription("simpleDeploymentStack", - new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) - .withParameters(mapOf("parameter1", - new DeploymentParameter() - .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) - .withExtensionConfigs( - mapOf("contoso", - new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", - new DeploymentExtensionConfigItem() - .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), - "configOne", - new DeploymentExtensionConfigItem().withValue( - BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) - .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("principal")) - .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), + new DeploymentStackInner() + .withProperties(new DeploymentStackProperties() + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties( + mapOf("configTwo", new DeploymentExtensionConfigItem().withValue(true), "configOne", + new DeploymentExtensionConfigItem().withValue("config1Value"))))) + .withActionOnUnmanage( + new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) + .withExcludedPrincipals(Arrays.asList("principal")) + .withExcludedActions(Arrays.asList("action")) + .withApplyToChildScopes(false))) + .withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java index 8866e60352f9..a5468e974f4f 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtManagementGroupSamples.java @@ -4,15 +4,14 @@ package com.azure.resourcemanager.resources.deploymentstacks.generated; -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; -import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -32,22 +31,20 @@ public final class DeploymentStacksValidateStackAtManagementGroupSamples { public static void validateAManagementGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .validateStackAtManagementGroup("myMg", "simpleDeploymentStack", - new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .validateStackAtManagementGroup("myMg", "simpleDeploymentStack", new DeploymentStackInner() + .withProperties(new DeploymentStackProperties() .withTemplateLink( new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", - new DeploymentParameter() - .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DETACH) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DETACH) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), - com.azure.core.util.Context.NONE); + .withApplyToChildScopes(false))) + .withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); } // Use "Map.of" if available diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java index 8b5fbcfb3fb9..95bee1be7df1 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtResourceGroupSamples.java @@ -4,15 +4,14 @@ package com.azure.resourcemanager.resources.deploymentstacks.generated; -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; -import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -33,19 +32,18 @@ public static void validateAResourceGroupDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() .validateStackAtResourceGroup("deploymentStacksRG", "simpleDeploymentStack", - new DeploymentStackInner().withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + new DeploymentStackInner().withProperties(new DeploymentStackProperties() .withTemplateLink( new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", - new DeploymentParameter() - .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), + .withApplyToChildScopes(false))) + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java index 4956d12b74b2..3e13d1749a41 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksValidateStackAtSubscriptionSamples.java @@ -4,15 +4,14 @@ package com.azure.resourcemanager.resources.deploymentstacks.generated; -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStackInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentParameter; +import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStackProperties; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; -import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -32,22 +31,20 @@ public final class DeploymentStacksValidateStackAtSubscriptionSamples { public static void validateASubscriptionDeploymentStack( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacks() - .validateStackAtSubscription("simpleDeploymentStack", - new DeploymentStackInner().withLocation("eastus") - .withTags(mapOf("tagkey", "fakeTokenPlaceholder")) + .validateStackAtSubscription("simpleDeploymentStack", new DeploymentStackInner() + .withProperties(new DeploymentStackProperties() .withTemplateLink( new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf("parameter1", - new DeploymentParameter() - .withValue(BinaryData.fromBytes("a string".getBytes(StandardCharsets.UTF_8))))) + .withParameters(mapOf("parameter1", new DeploymentParameter().withValue("a string"))) .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE)) .withDenySettings(new DenySettings().withMode(DenySettingsMode.DENY_DELETE) .withExcludedPrincipals(Arrays.asList("principal")) .withExcludedActions(Arrays.asList("action")) - .withApplyToChildScopes(false)), - com.azure.core.util.Context.NONE); + .withApplyToChildScopes(false))) + .withLocation("eastus") + .withTags(mapOf("tagkey", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); } // Use "Map.of" if available diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupCreateOrUpdateSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupCreateOrUpdateSamples.java index 8da41a484c26..8e25a35383b5 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupCreateOrUpdateSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.generated; -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; @@ -14,7 +13,6 @@ import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; -import java.nio.charset.StandardCharsets; import java.time.Duration; import java.util.HashMap; import java.util.Map; @@ -35,28 +33,21 @@ public static void createOrUpdateAManagementGroupDeploymentStackWhatIfResult( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacksWhatIfResultsAtManagementGroups() .createOrUpdate("myMg", "simpleDeploymentStackWhatIfResult", - new DeploymentStacksWhatIfResultInner() - .withProperties(new DeploymentStacksWhatIfResultProperties() - .withTemplateLink( - new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf()) - .withExtensionConfigs(mapOf("contoso", - new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", - new DeploymentExtensionConfigItem() - .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), - "configOne", - new DeploymentExtensionConfigItem().withValue( - BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) - .withActionOnUnmanage(new ActionOnUnmanage() - .withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings( - new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) - .withDeploymentStackResourceId( - "/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") - .withRetentionInterval(Duration.parse("P7D"))) - .withLocation("eastus"), + new DeploymentStacksWhatIfResultInner().withProperties(new DeploymentStacksWhatIfResultProperties() + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf()) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties( + mapOf("configTwo", new DeploymentExtensionConfigItem().withValue(true), "configOne", + new DeploymentExtensionConfigItem().withValue("config1Value"))))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) + .withDeploymentStackResourceId( + "/providers/Microsoft.Management/managementGroups/myMg/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") + .withRetentionInterval(Duration.parse("P7D"))).withLocation("eastus"), com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupCreateOrUpdateSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupCreateOrUpdateSamples.java index ed07b65c588d..675fd235584b 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupCreateOrUpdateSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.generated; -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettingsMode; @@ -13,7 +12,6 @@ import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; -import java.nio.charset.StandardCharsets; import java.time.Duration; import java.util.HashMap; import java.util.Map; @@ -36,27 +34,21 @@ public static void createOrUpdateAResourceGroupScopedDeploymentStackWhatIfResult .define("simpleDeploymentStackWhatIfResult") .withExistingResourceGroup("myResourceGroup") .withRegion("eastus") - .withProperties( - new DeploymentStacksWhatIfResultProperties() - .withTemplateLink( - new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf()) - .withExtensionConfigs( - mapOf("contoso", - new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", - new DeploymentExtensionConfigItem() - .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), - "configOne", - new DeploymentExtensionConfigItem().withValue( - BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) - .withActionOnUnmanage(new ActionOnUnmanage() - .withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings(new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) - .withDeploymentStackResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") - .withRetentionInterval(Duration.parse("P7D"))) + .withProperties(new DeploymentStacksWhatIfResultProperties() + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf()) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties( + mapOf("configTwo", new DeploymentExtensionConfigItem().withValue(true), "configOne", + new DeploymentExtensionConfigItem().withValue("config1Value"))))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) + .withDeploymentStackResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") + .withRetentionInterval(Duration.parse("P7D"))) .create(); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionCreateOrUpdateSamples.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionCreateOrUpdateSamples.java index c36854163975..b779c2ed8522 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionCreateOrUpdateSamples.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/samples/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.resources.deploymentstacks.generated; -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resources.deploymentstacks.fluent.models.DeploymentStacksWhatIfResultInner; import com.azure.resourcemanager.resources.deploymentstacks.models.ActionOnUnmanage; import com.azure.resourcemanager.resources.deploymentstacks.models.DenySettings; @@ -14,7 +13,6 @@ import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksDeleteDetachEnum; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksTemplateLink; import com.azure.resourcemanager.resources.deploymentstacks.models.DeploymentStacksWhatIfResultProperties; -import java.nio.charset.StandardCharsets; import java.time.Duration; import java.util.HashMap; import java.util.Map; @@ -35,28 +33,21 @@ public static void createOrUpdateASubscriptionScopedDeploymentStackWhatIfResult( com.azure.resourcemanager.resources.deploymentstacks.DeploymentStacksManager manager) { manager.deploymentStacksWhatIfResultsAtSubscriptions() .createOrUpdate("simpleDeploymentStackWhatIfResult", - new DeploymentStacksWhatIfResultInner() - .withProperties(new DeploymentStacksWhatIfResultProperties() - .withTemplateLink( - new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) - .withParameters(mapOf()) - .withExtensionConfigs(mapOf("contoso", - new DeploymentExtensionConfig().withAdditionalProperties(mapOf("configTwo", - new DeploymentExtensionConfigItem() - .withValue(BinaryData.fromBytes("true".getBytes(StandardCharsets.UTF_8))), - "configOne", - new DeploymentExtensionConfigItem().withValue( - BinaryData.fromBytes("config1Value".getBytes(StandardCharsets.UTF_8))))))) - .withActionOnUnmanage(new ActionOnUnmanage() - .withResources(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) - .withDenySettings( - new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) - .withDeploymentStackResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") - .withRetentionInterval(Duration.parse("P7D"))) - .withLocation("eastus"), + new DeploymentStacksWhatIfResultInner().withProperties(new DeploymentStacksWhatIfResultProperties() + .withTemplateLink( + new DeploymentStacksTemplateLink().withUri("https://example.com/exampleTemplate.json")) + .withParameters(mapOf()) + .withExtensionConfigs(mapOf("contoso", + new DeploymentExtensionConfig().withAdditionalProperties( + mapOf("configTwo", new DeploymentExtensionConfigItem().withValue(true), "configOne", + new DeploymentExtensionConfigItem().withValue("config1Value"))))) + .withActionOnUnmanage(new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DELETE) + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH)) + .withDenySettings(new DenySettings().withMode(DenySettingsMode.NONE).withApplyToChildScopes(false)) + .withDeploymentStackResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Resources/deploymentStacks/simpleDeploymentStack") + .withRetentionInterval(Duration.parse("P7D"))).withLocation("eastus"), com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ActionOnUnmanageTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ActionOnUnmanageTests.java index 7fd18036a712..fddbfccd0a00 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ActionOnUnmanageTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ActionOnUnmanageTests.java @@ -14,26 +14,26 @@ public final class ActionOnUnmanageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ActionOnUnmanage model = BinaryData.fromString( - "{\"resources\":\"detach\",\"resourceGroups\":\"detach\",\"managementGroups\":\"delete\",\"resourcesWithoutDeleteSupport\":\"detach\"}") + "{\"resources\":\"detach\",\"resourceGroups\":\"delete\",\"managementGroups\":\"detach\",\"resourcesWithoutDeleteSupport\":\"fail\"}") .toObject(ActionOnUnmanage.class); Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DETACH, model.resources()); - Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DETACH, model.resourceGroups()); - Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DELETE, model.managementGroups()); - Assertions.assertEquals(DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH, + Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DELETE, model.resourceGroups()); + Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DETACH, model.managementGroups()); + Assertions.assertEquals(DeploymentStacksResourcesWithoutDeleteSupportEnum.FAIL, model.resourcesWithoutDeleteSupport()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ActionOnUnmanage model = new ActionOnUnmanage().withResources(DeploymentStacksDeleteDetachEnum.DETACH) - .withResourceGroups(DeploymentStacksDeleteDetachEnum.DETACH) - .withManagementGroups(DeploymentStacksDeleteDetachEnum.DELETE) - .withResourcesWithoutDeleteSupport(DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH); + .withResourceGroups(DeploymentStacksDeleteDetachEnum.DELETE) + .withManagementGroups(DeploymentStacksDeleteDetachEnum.DETACH) + .withResourcesWithoutDeleteSupport(DeploymentStacksResourcesWithoutDeleteSupportEnum.FAIL); model = BinaryData.fromObject(model).toObject(ActionOnUnmanage.class); Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DETACH, model.resources()); - Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DETACH, model.resourceGroups()); - Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DELETE, model.managementGroups()); - Assertions.assertEquals(DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH, + Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DELETE, model.resourceGroups()); + Assertions.assertEquals(DeploymentStacksDeleteDetachEnum.DETACH, model.managementGroups()); + Assertions.assertEquals(DeploymentStacksResourcesWithoutDeleteSupportEnum.FAIL, model.resourcesWithoutDeleteSupport()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DenySettingsTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DenySettingsTests.java index 71b79a2ee0e7..12d1fb77fb5b 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DenySettingsTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DenySettingsTests.java @@ -14,24 +14,24 @@ public final class DenySettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DenySettings model = BinaryData.fromString( - "{\"mode\":\"denyDelete\",\"excludedPrincipals\":[\"pewnw\",\"eitjz\",\"flusarhmof\",\"qhsmyurkdtml\"],\"excludedActions\":[\"kuksjtxukcdm\",\"arcryuanzwuxzdxt\"],\"applyToChildScopes\":false}") + "{\"mode\":\"none\",\"excludedPrincipals\":[\"ryuanzwuxzdxtay\",\"lhmwhfpmrqobm\"],\"excludedActions\":[\"knryrtihfxtij\",\"pzvgnwzsymglzufc\",\"zk\"],\"applyToChildScopes\":true}") .toObject(DenySettings.class); - Assertions.assertEquals(DenySettingsMode.DENY_DELETE, model.mode()); - Assertions.assertEquals("pewnw", model.excludedPrincipals().get(0)); - Assertions.assertEquals("kuksjtxukcdm", model.excludedActions().get(0)); - Assertions.assertFalse(model.applyToChildScopes()); + Assertions.assertEquals(DenySettingsMode.NONE, model.mode()); + Assertions.assertEquals("ryuanzwuxzdxtay", model.excludedPrincipals().get(0)); + Assertions.assertEquals("knryrtihfxtij", model.excludedActions().get(0)); + Assertions.assertTrue(model.applyToChildScopes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DenySettings model = new DenySettings().withMode(DenySettingsMode.DENY_DELETE) - .withExcludedPrincipals(Arrays.asList("pewnw", "eitjz", "flusarhmof", "qhsmyurkdtml")) - .withExcludedActions(Arrays.asList("kuksjtxukcdm", "arcryuanzwuxzdxt")) - .withApplyToChildScopes(false); + DenySettings model = new DenySettings().withMode(DenySettingsMode.NONE) + .withExcludedPrincipals(Arrays.asList("ryuanzwuxzdxtay", "lhmwhfpmrqobm")) + .withExcludedActions(Arrays.asList("knryrtihfxtij", "pzvgnwzsymglzufc", "zk")) + .withApplyToChildScopes(true); model = BinaryData.fromObject(model).toObject(DenySettings.class); - Assertions.assertEquals(DenySettingsMode.DENY_DELETE, model.mode()); - Assertions.assertEquals("pewnw", model.excludedPrincipals().get(0)); - Assertions.assertEquals("kuksjtxukcdm", model.excludedActions().get(0)); - Assertions.assertFalse(model.applyToChildScopes()); + Assertions.assertEquals(DenySettingsMode.NONE, model.mode()); + Assertions.assertEquals("ryuanzwuxzdxtay", model.excludedPrincipals().get(0)); + Assertions.assertEquals("knryrtihfxtij", model.excludedActions().get(0)); + Assertions.assertTrue(model.applyToChildScopes()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputDefinitionTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputDefinitionTests.java index 26522e11fbd3..f54d402d3157 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputDefinitionTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputDefinitionTests.java @@ -12,14 +12,16 @@ public final class DeploymentExternalInputDefinitionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentExternalInputDefinition model - = BinaryData.fromString("{\"kind\":\"ucmpoyfd\"}").toObject(DeploymentExternalInputDefinition.class); - Assertions.assertEquals("ucmpoyfd", model.kind()); + = BinaryData.fromString("{\"kind\":\"flusarhmof\",\"config\":\"datahs\"}") + .toObject(DeploymentExternalInputDefinition.class); + Assertions.assertEquals("flusarhmof", model.kind()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeploymentExternalInputDefinition model = new DeploymentExternalInputDefinition().withKind("ucmpoyfd"); + DeploymentExternalInputDefinition model + = new DeploymentExternalInputDefinition().withKind("flusarhmof").withConfig("datahs"); model = BinaryData.fromObject(model).toObject(DeploymentExternalInputDefinition.class); - Assertions.assertEquals("ucmpoyfd", model.kind()); + Assertions.assertEquals("flusarhmof", model.kind()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputTests.java index c9225c0122ad..1fbbd0553651 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentExternalInputTests.java @@ -10,12 +10,13 @@ public final class DeploymentExternalInputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DeploymentExternalInput model = BinaryData.fromString("{}").toObject(DeploymentExternalInput.class); + DeploymentExternalInput model + = BinaryData.fromString("{\"value\":\"dataeitjz\"}").toObject(DeploymentExternalInput.class); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeploymentExternalInput model = new DeploymentExternalInput(); + DeploymentExternalInput model = new DeploymentExternalInput().withValue("dataeitjz"); model = BinaryData.fromObject(model).toObject(DeploymentExternalInput.class); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStackTemplateDefinitionInnerTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStackTemplateDefinitionInnerTests.java index de5afa2f4e86..845f58dfc026 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStackTemplateDefinitionInnerTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStackTemplateDefinitionInnerTests.java @@ -12,12 +12,12 @@ public final class DeploymentStackTemplateDefinitionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentStackTemplateDefinitionInner model = BinaryData.fromString( - "{\"template\":{},\"templateLink\":{\"uri\":\"g\",\"id\":\"dxyt\",\"relativePath\":\"oyrxvwfudwpzntxh\",\"queryString\":\"hl\",\"contentVersion\":\"jbhckfrlhr\"}}") + "{\"template\":\"datalaulppg\",\"templateLink\":{\"uri\":\"pnapnyiropuh\",\"id\":\"gvpgy\",\"relativePath\":\"qgitxmed\",\"queryString\":\"c\",\"contentVersion\":\"ynqwwncwzzhxgk\"}}") .toObject(DeploymentStackTemplateDefinitionInner.class); - Assertions.assertEquals("g", model.templateLink().uri()); - Assertions.assertEquals("dxyt", model.templateLink().id()); - Assertions.assertEquals("oyrxvwfudwpzntxh", model.templateLink().relativePath()); - Assertions.assertEquals("hl", model.templateLink().queryString()); - Assertions.assertEquals("jbhckfrlhr", model.templateLink().contentVersion()); + Assertions.assertEquals("pnapnyiropuh", model.templateLink().uri()); + Assertions.assertEquals("gvpgy", model.templateLink().id()); + Assertions.assertEquals("qgitxmed", model.templateLink().relativePath()); + Assertions.assertEquals("c", model.templateLink().queryString()); + Assertions.assertEquals("ynqwwncwzzhxgk", model.templateLink().contentVersion()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseDenyStatusModeTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseDenyStatusModeTests.java index dd839781416f..2df46e04a2f3 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseDenyStatusModeTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseDenyStatusModeTests.java @@ -13,9 +13,9 @@ public final class DeploymentStacksChangeBaseDenyStatusModeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentStacksChangeBaseDenyStatusMode model - = BinaryData.fromString("{\"before\":\"denyDelete\",\"after\":\"none\"}") + = BinaryData.fromString("{\"before\":\"inapplicable\",\"after\":\"none\"}") .toObject(DeploymentStacksChangeBaseDenyStatusMode.class); - Assertions.assertEquals(DenyStatusMode.DENY_DELETE, model.before()); + Assertions.assertEquals(DenyStatusMode.INAPPLICABLE, model.before()); Assertions.assertEquals(DenyStatusMode.NONE, model.after()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseTests.java index 0314fba6f392..cc7b1a10afd7 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeBaseTests.java @@ -11,9 +11,9 @@ public final class DeploymentStacksChangeBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DeploymentStacksChangeBase model = BinaryData.fromString("{\"before\":\"bfs\",\"after\":\"rbu\"}") + DeploymentStacksChangeBase model = BinaryData.fromString("{\"before\":\"dawkzbali\",\"after\":\"rqhakauha\"}") .toObject(DeploymentStacksChangeBase.class); - Assertions.assertEquals("bfs", model.before()); - Assertions.assertEquals("rbu", model.after()); + Assertions.assertEquals("dawkzbali", model.before()); + Assertions.assertEquals("rqhakauha", model.after()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaDenySettingsTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaDenySettingsTests.java index 48158d4a470c..a815127ff52e 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaDenySettingsTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaDenySettingsTests.java @@ -14,23 +14,23 @@ public final class DeploymentStacksChangeDeltaDenySettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentStacksChangeDeltaDenySettings model = BinaryData.fromString( - "{\"before\":{\"mode\":\"denyWriteAndDelete\",\"excludedPrincipals\":[\"ywnuzoq\"],\"excludedActions\":[\"yqzrnkcqvyxlw\",\"zlsico\"],\"applyToChildScopes\":false},\"after\":{\"mode\":\"none\",\"excludedPrincipals\":[\"lryav\",\"hheunmmqhgyx\",\"konocu\",\"oklyaxuconuq\"],\"excludedActions\":[\"kbeype\",\"rmjmwvvjektc\"],\"applyToChildScopes\":false},\"delta\":[{\"path\":\"rsffrzpwvlqdqgbi\",\"changeType\":\"create\",\"children\":[{\"path\":\"aetcktvfcivfs\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"uctqhjfbe\",\"changeType\":\"delete\"}]},{\"path\":\"xerf\",\"changeType\":\"array\",\"children\":[{\"path\":\"ttxfvjr\",\"changeType\":\"array\"},{\"path\":\"rp\",\"changeType\":\"delete\"},{\"path\":\"epcyvahfnlj\",\"changeType\":\"noEffect\"}]},{\"path\":\"j\",\"changeType\":\"create\",\"children\":[{\"path\":\"qgidokgjljyo\",\"changeType\":\"delete\"}]}]},{\"path\":\"ltbgsncghkj\",\"changeType\":\"create\",\"children\":[{\"path\":\"ijhtxf\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"fsm\",\"changeType\":\"modify\"}]},{\"path\":\"mpvecxgodebfqk\",\"changeType\":\"array\",\"children\":[{\"path\":\"pukgriwflzlfb\",\"changeType\":\"delete\"},{\"path\":\"puz\",\"changeType\":\"delete\"}]},{\"path\":\"pnq\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"gkbrpyyd\",\"changeType\":\"delete\"},{\"path\":\"bnuqqkpik\",\"changeType\":\"array\"},{\"path\":\"rgvtqag\",\"changeType\":\"create\"},{\"path\":\"uynhijg\",\"changeType\":\"noEffect\"}]}]}]}") + "{\"before\":{\"mode\":\"none\",\"excludedPrincipals\":[\"muzyoxaepdk\",\"jancu\"],\"excludedActions\":[\"d\",\"bavxbniwdjswzt\",\"dbpgnxytxhp\",\"xbzpfzab\"],\"applyToChildScopes\":false},\"after\":{\"mode\":\"denyWriteAndDelete\",\"excludedPrincipals\":[\"tcty\",\"iklbbovpl\"],\"excludedActions\":[\"hvgyuguosvmk\",\"ss\"],\"applyToChildScopes\":true},\"delta\":[{\"before\":\"dataplgmgsxnk\",\"after\":\"datakde\",\"path\":\"lpvlopw\",\"changeType\":\"noEffect\",\"children\":[{\"before\":\"dataxpkd\",\"after\":\"databaiuebbaumny\",\"path\":\"upedeojnabckhs\",\"changeType\":\"array\",\"children\":[{\"path\":\"siebtfhvpesapskr\",\"changeType\":\"noEffect\"},{\"path\":\"mhjjdhtldwkyzx\",\"changeType\":\"noEffect\"},{\"path\":\"tkncwsc\",\"changeType\":\"create\"}]},{\"before\":\"datalxotogtwrupq\",\"after\":\"datavnm\",\"path\":\"cykvceo\",\"changeType\":\"delete\",\"children\":[{\"path\":\"ovnotyfjfcnjbkcn\",\"changeType\":\"delete\"}]}]},{\"before\":\"databttk\",\"after\":\"dataywpnvjt\",\"path\":\"qnermclfplphoxu\",\"changeType\":\"array\",\"children\":[{\"before\":\"databgyepsbj\",\"after\":\"datazq\",\"path\":\"gxywpmue\",\"changeType\":\"delete\",\"children\":[{\"path\":\"wfqkquj\",\"changeType\":\"create\"},{\"path\":\"suyonobglaocq\",\"changeType\":\"delete\"},{\"path\":\"ccm\",\"changeType\":\"noEffect\"},{\"path\":\"udxytlmoyrx\",\"changeType\":\"create\"}]},{\"before\":\"datau\",\"after\":\"datapz\",\"path\":\"txhdzh\",\"changeType\":\"create\",\"children\":[{\"path\":\"bh\",\"changeType\":\"create\"},{\"path\":\"frlh\",\"changeType\":\"create\"},{\"path\":\"sbkyvpycanuzbp\",\"changeType\":\"array\"}]}]},{\"before\":\"datafkuwbcrnwbmehhse\",\"after\":\"datajusrtslhspk\",\"path\":\"eemaofmxagkvtme\",\"changeType\":\"create\",\"children\":[{\"before\":\"datahahvljuahaq\",\"after\":\"datac\",\"path\":\"hmdua\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"qpv\",\"changeType\":\"array\"},{\"path\":\"dmwsrcrgvxpvgomz\",\"changeType\":\"array\"},{\"path\":\"misgwbnb\",\"changeType\":\"modify\"}]}]}]}") .toObject(DeploymentStacksChangeDeltaDenySettings.class); - Assertions.assertEquals(DenySettingsMode.DENY_WRITE_AND_DELETE, model.before().mode()); - Assertions.assertEquals("ywnuzoq", model.before().excludedPrincipals().get(0)); - Assertions.assertEquals("yqzrnkcqvyxlw", model.before().excludedActions().get(0)); + Assertions.assertEquals(DenySettingsMode.NONE, model.before().mode()); + Assertions.assertEquals("muzyoxaepdk", model.before().excludedPrincipals().get(0)); + Assertions.assertEquals("d", model.before().excludedActions().get(0)); Assertions.assertFalse(model.before().applyToChildScopes()); - Assertions.assertEquals(DenySettingsMode.NONE, model.after().mode()); - Assertions.assertEquals("lryav", model.after().excludedPrincipals().get(0)); - Assertions.assertEquals("kbeype", model.after().excludedActions().get(0)); - Assertions.assertFalse(model.after().applyToChildScopes()); - Assertions.assertEquals("rsffrzpwvlqdqgbi", model.delta().get(0).path()); - Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.CREATE, model.delta().get(0).changeType()); - Assertions.assertEquals("aetcktvfcivfs", model.delta().get(0).children().get(0).path()); - Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.NO_EFFECT, + Assertions.assertEquals(DenySettingsMode.DENY_WRITE_AND_DELETE, model.after().mode()); + Assertions.assertEquals("tcty", model.after().excludedPrincipals().get(0)); + Assertions.assertEquals("hvgyuguosvmk", model.after().excludedActions().get(0)); + Assertions.assertTrue(model.after().applyToChildScopes()); + Assertions.assertEquals("lpvlopw", model.delta().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.NO_EFFECT, model.delta().get(0).changeType()); + Assertions.assertEquals("upedeojnabckhs", model.delta().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.ARRAY, model.delta().get(0).children().get(0).changeType()); - Assertions.assertEquals("uctqhjfbe", model.delta().get(0).children().get(0).children().get(0).path()); - Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, + Assertions.assertEquals("siebtfhvpesapskr", model.delta().get(0).children().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.NO_EFFECT, model.delta().get(0).children().get(0).children().get(0).changeType()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaRecordTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaRecordTests.java index a3383228e673..aa66d39678c8 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaRecordTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksChangeDeltaRecordTests.java @@ -13,14 +13,14 @@ public final class DeploymentStacksChangeDeltaRecordTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentStacksChangeDeltaRecord model = BinaryData.fromString( - "{\"before\":{},\"after\":{},\"delta\":[{\"path\":\"ywgndrv\",\"changeType\":\"delete\",\"children\":[{\"path\":\"phrcgyncoc\",\"changeType\":\"delete\",\"children\":[{\"path\":\"vmmcoofs\",\"changeType\":\"noEffect\"}]},{\"path\":\"v\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"jqabcypmivkwlzuv\",\"changeType\":\"noEffect\"},{\"path\":\"fwnfnb\",\"changeType\":\"modify\"},{\"path\":\"fionl\",\"changeType\":\"array\"},{\"path\":\"x\",\"changeType\":\"modify\"}]},{\"path\":\"tzxdpnqbqqwx\",\"changeType\":\"delete\",\"children\":[{\"path\":\"al\",\"changeType\":\"noEffect\"},{\"path\":\"wsubisnja\",\"changeType\":\"delete\"},{\"path\":\"mngnzscxaqw\",\"changeType\":\"create\"},{\"path\":\"chcbonqvpkvlrxnj\",\"changeType\":\"array\"}]},{\"path\":\"ipheoflokeyyien\",\"changeType\":\"create\",\"children\":[{\"path\":\"wtgrhpdjpj\",\"changeType\":\"noEffect\"},{\"path\":\"asxazjpqyegualhb\",\"changeType\":\"array\"},{\"path\":\"hejjz\",\"changeType\":\"modify\"}]}]},{\"path\":\"dgwdslfhot\",\"changeType\":\"modify\",\"children\":[{\"path\":\"wlbjnpgacftade\",\"changeType\":\"array\",\"children\":[{\"path\":\"tyfsoppusuesn\",\"changeType\":\"delete\"},{\"path\":\"dejbavo\",\"changeType\":\"noEffect\"}]},{\"path\":\"mohctb\",\"changeType\":\"array\",\"children\":[{\"path\":\"wxdndnvowgujjug\",\"changeType\":\"delete\"},{\"path\":\"kcglhslaz\",\"changeType\":\"modify\"}]}]}]}") + "{\"before\":{\"jumasx\":\"datalwtgrhpdj\",\"qyeg\":\"datazj\",\"hejjz\":\"dataalhbx\"},\"after\":{\"wmc\":\"dataudgwdslfho\",\"cftadeh\":\"datanpwlbjnpg\",\"dejbavo\":\"datanltyfsoppusuesnz\"},\"delta\":[{\"before\":\"datamohctb\",\"after\":\"dataudwxdndnvowguj\",\"path\":\"ugw\",\"changeType\":\"modify\",\"children\":[{\"before\":\"datahslazjdyggdtj\",\"after\":\"datahbkuofqwey\",\"path\":\"hmenevfyexfwhybc\",\"changeType\":\"modify\",\"children\":[{\"path\":\"vdcsitynn\",\"changeType\":\"noEffect\"},{\"path\":\"mdectehfiqscjey\",\"changeType\":\"modify\"},{\"path\":\"hezrkgq\",\"changeType\":\"modify\"}]},{\"before\":\"datarefovgmkqsleyyvx\",\"after\":\"datajpkcattpng\",\"path\":\"cr\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"qpjhvmda\",\"changeType\":\"noEffect\"},{\"path\":\"nysounqe\",\"changeType\":\"modify\"},{\"path\":\"noae\",\"changeType\":\"noEffect\"}]}]},{\"before\":\"datahy\",\"after\":\"datatrpmo\",\"path\":\"jmcmatuokthfu\",\"changeType\":\"modify\",\"children\":[{\"before\":\"datasfcpkvxodpuozm\",\"after\":\"dataydagfuaxbe\",\"path\":\"yiuokktwh\",\"changeType\":\"create\",\"children\":[{\"path\":\"zywqsmbsu\",\"changeType\":\"create\"}]},{\"before\":\"dataimoryocfsfksym\",\"after\":\"datays\",\"path\":\"kiiuxhqyudxor\",\"changeType\":\"create\",\"children\":[{\"path\":\"poczvyifqrvkdvjs\",\"changeType\":\"delete\"}]},{\"before\":\"datamvvd\",\"after\":\"dataatkpnp\",\"path\":\"lexxbczwtru\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"bq\",\"changeType\":\"create\"}]},{\"before\":\"dataovm\",\"after\":\"datakacspkw\",\"path\":\"hzdobpxjmflbvvnc\",\"changeType\":\"create\",\"children\":[{\"path\":\"ciwwzjuqkhr\",\"changeType\":\"modify\"}]}]},{\"before\":\"dataiwkuofos\",\"after\":\"datahsauuimjmvxied\",\"path\":\"ugidyjrr\",\"changeType\":\"array\",\"children\":[{\"before\":\"datasvexcsonpclhoco\",\"after\":\"datalkevle\",\"path\":\"gz\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"fmvfaxkffeiit\",\"changeType\":\"noEffect\"},{\"path\":\"vmezy\",\"changeType\":\"noEffect\"},{\"path\":\"hxmzsbbzoggig\",\"changeType\":\"delete\"}]}]}]}") .toObject(DeploymentStacksChangeDeltaRecord.class); - Assertions.assertEquals("ywgndrv", model.delta().get(0).path()); - Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, model.delta().get(0).changeType()); - Assertions.assertEquals("phrcgyncoc", model.delta().get(0).children().get(0).path()); - Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, + Assertions.assertEquals("ugw", model.delta().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.MODIFY, model.delta().get(0).changeType()); + Assertions.assertEquals("hmenevfyexfwhybc", model.delta().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.MODIFY, model.delta().get(0).children().get(0).changeType()); - Assertions.assertEquals("vmmcoofs", model.delta().get(0).children().get(0).children().get(0).path()); + Assertions.assertEquals("vdcsitynn", model.delta().get(0).children().get(0).children().get(0).path()); Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.NO_EFFECT, model.delta().get(0).children().get(0).children().get(0).changeType()); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDebugSettingTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDebugSettingTests.java index ea41bc9d5b32..0159b86adc94 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDebugSettingTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDebugSettingTests.java @@ -11,15 +11,15 @@ public final class DeploymentStacksDebugSettingTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DeploymentStacksDebugSetting model - = BinaryData.fromString("{\"detailLevel\":\"fjddeqs\"}").toObject(DeploymentStacksDebugSetting.class); - Assertions.assertEquals("fjddeqs", model.detailLevel()); + DeploymentStacksDebugSetting model = BinaryData.fromString("{\"detailLevel\":\"xhekuksjtxukcdm\"}") + .toObject(DeploymentStacksDebugSetting.class); + Assertions.assertEquals("xhekuksjtxukcdm", model.detailLevel()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeploymentStacksDebugSetting model = new DeploymentStacksDebugSetting().withDetailLevel("fjddeqs"); + DeploymentStacksDebugSetting model = new DeploymentStacksDebugSetting().withDetailLevel("xhekuksjtxukcdm"); model = BinaryData.fromObject(model).toObject(DeploymentStacksDebugSetting.class); - Assertions.assertEquals("fjddeqs", model.detailLevel()); + Assertions.assertEquals("xhekuksjtxukcdm", model.detailLevel()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtManagementGroupMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtManagementGroupMockTests.java index cab561eca161..7efa10c1c3a9 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtManagementGroupMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtManagementGroupMockTests.java @@ -30,9 +30,9 @@ public void testDeleteAtManagementGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.deploymentStacks() - .deleteAtManagementGroup("bkrvrnsvshqj", "hxcr", DeploymentStacksDeleteDetachEnum.DETACH, - DeploymentStacksDeleteDetachEnum.DELETE, DeploymentStacksDeleteDetachEnum.DETACH, - DeploymentStacksResourcesWithoutDeleteSupportEnum.FAIL, false, com.azure.core.util.Context.NONE); + .deleteAtManagementGroup("vmwy", "rfouyftaakcpw", DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksDeleteDetachEnum.DETACH, DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksResourcesWithoutDeleteSupportEnum.FAIL, true, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtSubscriptionMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtSubscriptionMockTests.java index c6eb000385ea..1ade3b36a084 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtSubscriptionMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteAtSubscriptionMockTests.java @@ -30,8 +30,8 @@ public void testDeleteAtSubscription() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.deploymentStacks() - .deleteAtSubscription("pigvpgylgqgitx", DeploymentStacksDeleteDetachEnum.DETACH, - DeploymentStacksDeleteDetachEnum.DELETE, DeploymentStacksDeleteDetachEnum.DELETE, + .deleteAtSubscription("wwquuvxzxclvithh", DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksDeleteDetachEnum.DELETE, DeploymentStacksDeleteDetachEnum.DETACH, DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH, false, com.azure.core.util.Context.NONE); } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteMockTests.java index 46142bd0adbb..6602d2b5fed2 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksDeleteMockTests.java @@ -30,9 +30,9 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.deploymentStacks() - .delete("vzunluthnnprnxi", "eilpjzuaejxdu", DeploymentStacksDeleteDetachEnum.DETACH, - DeploymentStacksDeleteDetachEnum.DELETE, DeploymentStacksDeleteDetachEnum.DELETE, - DeploymentStacksResourcesWithoutDeleteSupportEnum.FAIL, true, com.azure.core.util.Context.NONE); + .delete("lcxog", "okonzmnsikvmkqz", DeploymentStacksDeleteDetachEnum.DETACH, + DeploymentStacksDeleteDetachEnum.DELETE, DeploymentStacksDeleteDetachEnum.DETACH, + DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH, false, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtManagementGroupWithResponseMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtManagementGroupWithResponseMockTests.java index da7008061fe1..4be0c46edb54 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtManagementGroupWithResponseMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtManagementGroupWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class DeploymentStacksExportTemplateAtManagementGroupWithResponseMo @Test public void testExportTemplateAtManagementGroupWithResponse() throws Exception { String responseStr - = "{\"template\":{},\"templateLink\":{\"uri\":\"rfbjf\",\"id\":\"w\",\"relativePath\":\"otftpvjzbexilz\",\"queryString\":\"fqqnvwpmqtaruo\",\"contentVersion\":\"mkcjhwqytjrybn\"}}"; + = "{\"template\":\"datakopkwhojvpajqgx\",\"templateLink\":{\"uri\":\"ocmbqfqvmkcxoza\",\"id\":\"helxprglya\",\"relativePath\":\"dckcbc\",\"queryString\":\"jrjxgciqibrhosx\",\"contentVersion\":\"qrhzoymibmrqyib\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,14 @@ public void testExportTemplateAtManagementGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeploymentStackTemplateDefinition response = manager.deploymentStacks() - .exportTemplateAtManagementGroupWithResponse("srruvwbhsqfsubcg", "birx", com.azure.core.util.Context.NONE) + .exportTemplateAtManagementGroupWithResponse("mnubexkpzksmond", "mquxvypo", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("rfbjf", response.templateLink().uri()); - Assertions.assertEquals("w", response.templateLink().id()); - Assertions.assertEquals("otftpvjzbexilz", response.templateLink().relativePath()); - Assertions.assertEquals("fqqnvwpmqtaruo", response.templateLink().queryString()); - Assertions.assertEquals("mkcjhwqytjrybn", response.templateLink().contentVersion()); + Assertions.assertEquals("ocmbqfqvmkcxoza", response.templateLink().uri()); + Assertions.assertEquals("helxprglya", response.templateLink().id()); + Assertions.assertEquals("dckcbc", response.templateLink().relativePath()); + Assertions.assertEquals("jrjxgciqibrhosx", response.templateLink().queryString()); + Assertions.assertEquals("qrhzoymibmrqyib", response.templateLink().contentVersion()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtResourceGroupWithResponseMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtResourceGroupWithResponseMockTests.java index c70c48664828..2106baef0471 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtResourceGroupWithResponseMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtResourceGroupWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class DeploymentStacksExportTemplateAtResourceGroupWithResponseMock @Test public void testExportTemplateAtResourceGroupWithResponse() throws Exception { String responseStr - = "{\"template\":{},\"templateLink\":{\"uri\":\"ofd\",\"id\":\"uusdttouwa\",\"relativePath\":\"ekqvkeln\",\"queryString\":\"vbxwyjsflhh\",\"contentVersion\":\"aln\"}}"; + = "{\"template\":\"dataur\",\"templateLink\":{\"uri\":\"kwobdagxtibq\",\"id\":\"bxwakbog\",\"relativePath\":\"ndlkzgxhurip\",\"queryString\":\"podxunkb\",\"contentVersion\":\"xmubyyntwlrbq\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testExportTemplateAtResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeploymentStackTemplateDefinition response = manager.deploymentStacks() - .exportTemplateAtResourceGroupWithResponse("btdzumveekg", "wozuhkf", com.azure.core.util.Context.NONE) + .exportTemplateAtResourceGroupWithResponse("tfz", "mhhv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ofd", response.templateLink().uri()); - Assertions.assertEquals("uusdttouwa", response.templateLink().id()); - Assertions.assertEquals("ekqvkeln", response.templateLink().relativePath()); - Assertions.assertEquals("vbxwyjsflhh", response.templateLink().queryString()); - Assertions.assertEquals("aln", response.templateLink().contentVersion()); + Assertions.assertEquals("kwobdagxtibq", response.templateLink().uri()); + Assertions.assertEquals("bxwakbog", response.templateLink().id()); + Assertions.assertEquals("ndlkzgxhurip", response.templateLink().relativePath()); + Assertions.assertEquals("podxunkb", response.templateLink().queryString()); + Assertions.assertEquals("xmubyyntwlrbq", response.templateLink().contentVersion()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtSubscriptionWithResponseMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtSubscriptionWithResponseMockTests.java index 441c7f51bd63..152d8b5d7b92 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtSubscriptionWithResponseMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksExportTemplateAtSubscriptionWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class DeploymentStacksExportTemplateAtSubscriptionWithResponseMockT @Test public void testExportTemplateAtSubscriptionWithResponse() throws Exception { String responseStr - = "{\"template\":{},\"templateLink\":{\"uri\":\"gktrmgucnapkte\",\"id\":\"llwptfdy\",\"relativePath\":\"fqbuaceopzf\",\"queryString\":\"hhuao\",\"contentVersion\":\"pcqeqx\"}}"; + = "{\"template\":\"dataka\",\"templateLink\":{\"uri\":\"tiiswacffg\",\"id\":\"zzewkfvhqcrai\",\"relativePath\":\"pnppfuf\",\"queryString\":\"wdmhdlxyjrxs\",\"contentVersion\":\"afcnih\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testExportTemplateAtSubscriptionWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeploymentStackTemplateDefinition response = manager.deploymentStacks() - .exportTemplateAtSubscriptionWithResponse("slynqwwnc", com.azure.core.util.Context.NONE) + .exportTemplateAtSubscriptionWithResponse("ggbhcohfwds", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gktrmgucnapkte", response.templateLink().uri()); - Assertions.assertEquals("llwptfdy", response.templateLink().id()); - Assertions.assertEquals("fqbuaceopzf", response.templateLink().relativePath()); - Assertions.assertEquals("hhuao", response.templateLink().queryString()); - Assertions.assertEquals("pcqeqx", response.templateLink().contentVersion()); + Assertions.assertEquals("tiiswacffg", response.templateLink().uri()); + Assertions.assertEquals("zzewkfvhqcrai", response.templateLink().id()); + Assertions.assertEquals("pnppfuf", response.templateLink().relativePath()); + Assertions.assertEquals("wdmhdlxyjrxs", response.templateLink().queryString()); + Assertions.assertEquals("afcnih", response.templateLink().contentVersion()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksParametersLinkTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksParametersLinkTests.java index 044aff808bc8..3f9c17474494 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksParametersLinkTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksParametersLinkTests.java @@ -12,18 +12,18 @@ public final class DeploymentStacksParametersLinkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentStacksParametersLink model - = BinaryData.fromString("{\"uri\":\"qgn\",\"contentVersion\":\"ooojywifsqe\"}") + = BinaryData.fromString("{\"uri\":\"xrifkwmrvkts\",\"contentVersion\":\"nt\"}") .toObject(DeploymentStacksParametersLink.class); - Assertions.assertEquals("qgn", model.uri()); - Assertions.assertEquals("ooojywifsqe", model.contentVersion()); + Assertions.assertEquals("xrifkwmrvkts", model.uri()); + Assertions.assertEquals("nt", model.contentVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DeploymentStacksParametersLink model - = new DeploymentStacksParametersLink().withUri("qgn").withContentVersion("ooojywifsqe"); + = new DeploymentStacksParametersLink().withUri("xrifkwmrvkts").withContentVersion("nt"); model = BinaryData.fromObject(model).toObject(DeploymentStacksParametersLink.class); - Assertions.assertEquals("qgn", model.uri()); - Assertions.assertEquals("ooojywifsqe", model.contentVersion()); + Assertions.assertEquals("xrifkwmrvkts", model.uri()); + Assertions.assertEquals("nt", model.contentVersion()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksTemplateLinkTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksTemplateLinkTests.java index 0266d6b694f9..d90ee21d399c 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksTemplateLinkTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksTemplateLinkTests.java @@ -12,27 +12,27 @@ public final class DeploymentStacksTemplateLinkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentStacksTemplateLink model = BinaryData.fromString( - "{\"uri\":\"dxbmtqioq\",\"id\":\"ehtbm\",\"relativePath\":\"p\",\"queryString\":\"noi\",\"contentVersion\":\"wlrxyb\"}") + "{\"uri\":\"zehtbmu\",\"id\":\"ownoizhw\",\"relativePath\":\"xybqsoqij\",\"queryString\":\"dmbpazlobcufpdz\",\"contentVersion\":\"btcqq\"}") .toObject(DeploymentStacksTemplateLink.class); - Assertions.assertEquals("dxbmtqioq", model.uri()); - Assertions.assertEquals("ehtbm", model.id()); - Assertions.assertEquals("p", model.relativePath()); - Assertions.assertEquals("noi", model.queryString()); - Assertions.assertEquals("wlrxyb", model.contentVersion()); + Assertions.assertEquals("zehtbmu", model.uri()); + Assertions.assertEquals("ownoizhw", model.id()); + Assertions.assertEquals("xybqsoqij", model.relativePath()); + Assertions.assertEquals("dmbpazlobcufpdz", model.queryString()); + Assertions.assertEquals("btcqq", model.contentVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeploymentStacksTemplateLink model = new DeploymentStacksTemplateLink().withUri("dxbmtqioq") - .withId("ehtbm") - .withRelativePath("p") - .withQueryString("noi") - .withContentVersion("wlrxyb"); + DeploymentStacksTemplateLink model = new DeploymentStacksTemplateLink().withUri("zehtbmu") + .withId("ownoizhw") + .withRelativePath("xybqsoqij") + .withQueryString("dmbpazlobcufpdz") + .withContentVersion("btcqq"); model = BinaryData.fromObject(model).toObject(DeploymentStacksTemplateLink.class); - Assertions.assertEquals("dxbmtqioq", model.uri()); - Assertions.assertEquals("ehtbm", model.id()); - Assertions.assertEquals("p", model.relativePath()); - Assertions.assertEquals("noi", model.queryString()); - Assertions.assertEquals("wlrxyb", model.contentVersion()); + Assertions.assertEquals("zehtbmu", model.uri()); + Assertions.assertEquals("ownoizhw", model.id()); + Assertions.assertEquals("xybqsoqij", model.relativePath()); + Assertions.assertEquals("dmbpazlobcufpdz", model.queryString()); + Assertions.assertEquals("btcqq", model.contentVersion()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfChangeTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfChangeTests.java index aa061cbd2a5f..ab026c111d9a 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfChangeTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfChangeTests.java @@ -18,26 +18,26 @@ public final class DeploymentStacksWhatIfChangeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentStacksWhatIfChange model = BinaryData.fromString( - "{\"resourceChanges\":[{\"id\":\"m\",\"extension\":{\"name\":\"fp\",\"version\":\"rqobmtuk\",\"configId\":\"ryrtihfxtijbpzv\",\"config\":{\"symglzufcyz\":{},\"ohdbihanufh\":{},\"cbjy\":{},\"a\":{}}},\"type\":\"th\",\"identifiers\":{},\"apiVersion\":\"bifpikxwczb\",\"deploymentId\":\"cnpqxuhivyqniwby\",\"symbolicName\":\"k\",\"changeType\":\"delete\",\"changeCertainty\":\"potential\",\"managementStatusChange\":{\"before\":\"managed\",\"after\":\"unmanaged\"},\"denyStatusChange\":{\"before\":\"unknown\",\"after\":\"denyWriteAndDelete\"},\"unsupportedReason\":\"xgaudccs\",\"resourceConfigurationChanges\":{\"before\":{},\"after\":{},\"delta\":[{\"path\":\"kryhtnapczwlokj\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"kvnipjoxz\",\"changeType\":\"delete\"},{\"path\":\"chgejspodm\",\"changeType\":\"create\"},{\"path\":\"lzydehojwyahux\",\"changeType\":\"delete\"}]},{\"path\":\"qnjaqwix\",\"changeType\":\"delete\",\"children\":[{\"path\":\"ozvcput\",\"changeType\":\"array\"}]}]}},{\"id\":\"vwmf\",\"extension\":{\"name\":\"t\",\"version\":\"cmdv\",\"configId\":\"hulsuuvmkjozkrwf\",\"config\":{\"djpslw\":{},\"jdpvwryo\":{},\"psoacctazakljl\":{}}},\"type\":\"bcryffdfd\",\"identifiers\":{},\"apiVersion\":\"expa\",\"deploymentId\":\"akhmsbzjhcrz\",\"symbolicName\":\"dphlxaolt\",\"changeType\":\"delete\",\"changeCertainty\":\"definite\",\"managementStatusChange\":{\"before\":\"managed\",\"after\":\"unmanaged\"},\"denyStatusChange\":{\"before\":\"denyWriteAndDelete\",\"after\":\"inapplicable\"},\"unsupportedReason\":\"n\",\"resourceConfigurationChanges\":{\"before\":{},\"after\":{},\"delta\":[{\"path\":\"xxjtfe\",\"changeType\":\"delete\",\"children\":[{\"path\":\"fziton\",\"changeType\":\"delete\"},{\"path\":\"qfpjk\",\"changeType\":\"create\"},{\"path\":\"xofpdvhpfxxypi\",\"changeType\":\"array\"},{\"path\":\"nmayhuybb\",\"changeType\":\"create\"}]}]}},{\"id\":\"depoog\",\"extension\":{\"name\":\"uvamiheognarxzxt\",\"version\":\"eotusivyevc\",\"configId\":\"qi\",\"config\":{\"ngbwjz\":{}}},\"type\":\"fygxgispemvtzfk\",\"identifiers\":{},\"apiVersion\":\"ljofxqeofjaeqjh\",\"deploymentId\":\"b\",\"symbolicName\":\"v\",\"changeType\":\"create\",\"changeCertainty\":\"potential\",\"managementStatusChange\":{\"before\":\"managed\",\"after\":\"unmanaged\"},\"denyStatusChange\":{\"before\":\"inapplicable\",\"after\":\"removedBySystem\"},\"unsupportedReason\":\"ybkzgcwr\",\"resourceConfigurationChanges\":{\"before\":{},\"after\":{},\"delta\":[{\"path\":\"ouskcqvkocrc\",\"changeType\":\"create\",\"children\":[{\"path\":\"tnhxbn\",\"changeType\":\"array\"},{\"path\":\"iksqr\",\"changeType\":\"delete\"},{\"path\":\"ssainqpjwnzll\",\"changeType\":\"modify\"},{\"path\":\"mppeebvmgxs\",\"changeType\":\"noEffect\"}]},{\"path\":\"qduujitcjczdz\",\"changeType\":\"delete\",\"children\":[{\"path\":\"hkr\",\"changeType\":\"array\"},{\"path\":\"d\",\"changeType\":\"array\"},{\"path\":\"p\",\"changeType\":\"noEffect\"},{\"path\":\"bdkvwrwjf\",\"changeType\":\"modify\"}]}]}},{\"id\":\"nhutjeltmrldhugj\",\"extension\":{\"name\":\"datqxhocdgeabl\",\"version\":\"phut\",\"configId\":\"ndv\",\"config\":{\"wyiftyhxhur\":{},\"k\":{},\"tyxolniwpwc\":{}}},\"type\":\"jfkgiawxk\",\"identifiers\":{},\"apiVersion\":\"lwckbasyypnddhs\",\"deploymentId\":\"bacphejko\",\"symbolicName\":\"nqgoulzndli\",\"changeType\":\"create\",\"changeCertainty\":\"definite\",\"managementStatusChange\":{\"before\":\"managed\",\"after\":\"managed\"},\"denyStatusChange\":{\"before\":\"denyWriteAndDelete\",\"after\":\"notSupported\"},\"unsupportedReason\":\"akeqs\",\"resourceConfigurationChanges\":{\"before\":{},\"after\":{},\"delta\":[{\"path\":\"ytb\",\"changeType\":\"array\",\"children\":[{\"path\":\"ouf\",\"changeType\":\"array\"},{\"path\":\"mnkzsmod\",\"changeType\":\"array\"},{\"path\":\"lougpbkw\",\"changeType\":\"array\"},{\"path\":\"utduqktapspwgcu\",\"changeType\":\"modify\"}]}]}}],\"denySettingsChange\":{\"before\":{\"mode\":\"none\",\"excludedPrincipals\":[\"dosvqwhbmdgbbjf\",\"dgmb\"],\"excludedActions\":[\"xppbhtqqro\"],\"applyToChildScopes\":false},\"after\":{\"mode\":\"denyWriteAndDelete\",\"excludedPrincipals\":[\"lgbquxig\",\"yjgzjaoyfhrtxiln\",\"rkujy\",\"vlejuvfqa\"],\"excludedActions\":[\"yxwjkcp\",\"bnwbxgjvtbvpyssz\",\"nruj\",\"guhmuouqfpr\"],\"applyToChildScopes\":true},\"delta\":[{\"path\":\"itnwuizgazxufi\",\"changeType\":\"create\",\"children\":[{\"path\":\"i\",\"changeType\":\"create\",\"children\":[{\"path\":\"dfvzwdzuhty\",\"changeType\":\"array\"}]}]},{\"path\":\"dkfthwxmnt\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"vkmijcmmxdcuf\",\"changeType\":\"create\",\"children\":[{\"path\":\"pymzidnsezcxtbzs\",\"changeType\":\"noEffect\"},{\"path\":\"yc\",\"changeType\":\"modify\"},{\"path\":\"newmdwzjeiachbo\",\"changeType\":\"create\"}]}]},{\"path\":\"nrosfqpte\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"pyqr\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"npvswjdkirso\",\"changeType\":\"noEffect\"},{\"path\":\"qxhcrmn\",\"changeType\":\"modify\"},{\"path\":\"jtckwhdso\",\"changeType\":\"create\"},{\"path\":\"iy\",\"changeType\":\"noEffect\"}]},{\"path\":\"sqwpgrjb\",\"changeType\":\"modify\",\"children\":[{\"path\":\"cjxvsnbyxqab\",\"changeType\":\"delete\"},{\"path\":\"ocpcy\",\"changeType\":\"delete\"},{\"path\":\"urzafb\",\"changeType\":\"noEffect\"},{\"path\":\"j\",\"changeType\":\"delete\"}]},{\"path\":\"oq\",\"changeType\":\"delete\",\"children\":[{\"path\":\"ljavbqid\",\"changeType\":\"modify\"}]},{\"path\":\"zyulp\",\"changeType\":\"modify\",\"children\":[{\"path\":\"krlkhbzhfepg\",\"changeType\":\"delete\"},{\"path\":\"qex\",\"changeType\":\"array\"},{\"path\":\"ocxscpaierhhbcs\",\"changeType\":\"create\"},{\"path\":\"ummajtjaod\",\"changeType\":\"array\"}]}]},{\"path\":\"bdxkqpxokaj\",\"changeType\":\"create\",\"children\":[{\"path\":\"ex\",\"changeType\":\"create\",\"children\":[{\"path\":\"gcpo\",\"changeType\":\"array\"}]},{\"path\":\"ajrmvdjwzrlovmc\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"j\",\"changeType\":\"delete\"},{\"path\":\"ejctbzaqsqsycb\",\"changeType\":\"modify\"},{\"path\":\"fkgukdkexxppof\",\"changeType\":\"delete\"}]},{\"path\":\"c\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"ddtocjjxhvp\",\"changeType\":\"create\"},{\"path\":\"uexhdzx\",\"changeType\":\"modify\"}]},{\"path\":\"ojnxqbzvdd\",\"changeType\":\"array\",\"children\":[{\"path\":\"deicbtwnpzao\",\"changeType\":\"modify\"}]}]}]},\"deploymentScopeChange\":{\"before\":\"rhcffcydd\",\"after\":\"mjthjqkwp\"}}") + "{\"resourceChanges\":[{\"id\":\"hanufhfcbjysagi\",\"extension\":{\"name\":\"xqhabi\",\"version\":\"pikxwczbyscnpqxu\",\"configId\":\"vyq\",\"config\":{\"ybrk\":{}}},\"type\":\"dumjgrtfwvuk\",\"identifiers\":{\"yejhk\":\"dataudccsnhsjc\",\"kkvnipjox\":\"datayhtnapczwlokjye\",\"podmailzydehojwy\":\"datajnchgej\"},\"apiVersion\":\"uxinpmqnjaq\",\"deploymentId\":\"xj\",\"symbolicName\":\"r\",\"changeType\":\"noChange\",\"changeCertainty\":\"definite\",\"managementStatusChange\":{\"before\":\"unknown\",\"after\":\"unknown\"},\"denyStatusChange\":{\"before\":\"none\",\"after\":\"denyDelete\"},\"unsupportedReason\":\"datscmd\",\"resourceConfigurationChanges\":{\"before\":{\"suuv\":\"datau\",\"odjpslwejd\":\"datakjozkrwfnd\",\"cctazakljlahbc\":\"datavwryoqpso\",\"gexpaojakhmsbz\":\"datayffdfdos\"},\"after\":{\"hqtrgqjbpf\":\"datarzevdphlxaol\",\"tfell\":\"datafsinzgvfcjrwzoxx\",\"lxofpdvhpfxxypin\":\"datawfzitonpeqfpjk\"},\"delta\":[{\"before\":\"datayhuybbkpod\",\"after\":\"dataooginuvamih\",\"path\":\"ognarxzxtheotus\",\"changeType\":\"delete\",\"children\":[{\"path\":\"v\",\"changeType\":\"delete\"},{\"path\":\"iqihn\",\"changeType\":\"modify\"},{\"path\":\"ngbwjz\",\"changeType\":\"array\"}]},{\"before\":\"dataygxgispemvtz\",\"after\":\"dataufubl\",\"path\":\"ofx\",\"changeType\":\"modify\",\"children\":[{\"path\":\"jaeq\",\"changeType\":\"delete\"},{\"path\":\"qjbasvms\",\"changeType\":\"noEffect\"}]},{\"before\":\"dataulngsntn\",\"after\":\"databkzgcwrwclx\",\"path\":\"wrljdouskc\",\"changeType\":\"delete\",\"children\":[{\"path\":\"cr\",\"changeType\":\"array\"},{\"path\":\"dkwt\",\"changeType\":\"array\"}]},{\"before\":\"databnjbiksqrglssain\",\"after\":\"datajwnzlljfmp\",\"path\":\"eebvmgxsab\",\"changeType\":\"array\",\"children\":[{\"path\":\"uujitcjc\",\"changeType\":\"create\"},{\"path\":\"zevndhkrwpdappds\",\"changeType\":\"noEffect\"}]}]}},{\"id\":\"vwrwj\",\"extension\":{\"name\":\"usnhutje\",\"version\":\"tmrldhugjzzdatq\",\"configId\":\"oc\",\"config\":{\"blgphuticn\":{},\"vkaozwyiftyhxhur\":{},\"k\":{},\"tyxolniwpwc\":{}}},\"type\":\"jfkgiawxk\",\"identifiers\":{\"ypnddhsgcb\":\"dataplwckbas\"},\"apiVersion\":\"phejkotynqgoulz\",\"deploymentId\":\"likwyqkgfgib\",\"symbolicName\":\"dgak\",\"changeType\":\"noChange\",\"changeCertainty\":\"definite\",\"managementStatusChange\":{\"before\":\"unknown\",\"after\":\"managed\"},\"denyStatusChange\":{\"before\":\"denyWriteAndDelete\",\"after\":\"unknown\"},\"unsupportedReason\":\"tbciqfouflmm\",\"resourceConfigurationChanges\":{\"before\":{\"wtmutduq\":\"datamodmglougpb\",\"spwgcuertumkdosv\":\"datata\",\"bbjfddgmbmbexp\":\"datawhbmd\"},\"after\":{\"rolfpfp\":\"datatq\",\"jaoyfhrtx\":\"dataalgbquxigjyjg\",\"fqawrlyxw\":\"datalnerkujysvleju\"},\"delta\":[{\"before\":\"datarbnwbxgjvtbvpy\",\"after\":\"datazdn\",\"path\":\"uj\",\"changeType\":\"delete\",\"children\":[{\"path\":\"muouqfp\",\"changeType\":\"noEffect\"},{\"path\":\"zw\",\"changeType\":\"create\"},{\"path\":\"g\",\"changeType\":\"delete\"},{\"path\":\"tnwu\",\"changeType\":\"array\"}]}]}}],\"denySettingsChange\":{\"before\":{\"mode\":\"denyDelete\",\"excludedPrincipals\":[\"ufizuckyf\"],\"excludedActions\":[\"fidfvzw\",\"zuhtymwisdkfthwx\",\"nteiwaopv\"],\"applyToChildScopes\":false},\"after\":{\"mode\":\"denyWriteAndDelete\",\"excludedPrincipals\":[\"xdcu\",\"uf\",\"rpymzidnsez\"],\"excludedActions\":[\"bzsgfyccsne\",\"mdwzjeiachboo\",\"flnrosfqpteehzz\"],\"applyToChildScopes\":false},\"delta\":[{\"before\":\"datai\",\"after\":\"datainpvswjdkirsoodq\",\"path\":\"hc\",\"changeType\":\"create\",\"children\":[{\"before\":\"datajtckwhdso\",\"after\":\"dataiy\",\"path\":\"pjxsqwpgrjbznor\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"snb\",\"changeType\":\"delete\"}]},{\"before\":\"dataabnmocpcyshu\",\"after\":\"dataafbljjgpbtoqcjmk\",\"path\":\"javbqidtqajz\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"kudjkrlkhb\",\"changeType\":\"create\"}]}]},{\"before\":\"dataepgzgqexz\",\"after\":\"datac\",\"path\":\"scpai\",\"changeType\":\"delete\",\"children\":[{\"before\":\"datacsglum\",\"after\":\"datajtjaodxobnbdxkq\",\"path\":\"xo\",\"changeType\":\"array\",\"children\":[{\"path\":\"onpimexgstxg\",\"changeType\":\"noEffect\"},{\"path\":\"odgmaajrmvdjwz\",\"changeType\":\"array\"},{\"path\":\"ovmclwhijcoejct\",\"changeType\":\"modify\"}]},{\"before\":\"dataqsqsy\",\"after\":\"datakbfkg\",\"path\":\"kdkexxp\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"xaxcfjpgddtocjjx\",\"changeType\":\"modify\"},{\"path\":\"pmouexhdz\",\"changeType\":\"noEffect\"}]}]},{\"before\":\"dataqeojnxqbzvddntw\",\"after\":\"dataeic\",\"path\":\"twnpzaoqvuhrhcf\",\"changeType\":\"delete\",\"children\":[{\"before\":\"dataglmjth\",\"after\":\"datakw\",\"path\":\"yeicxmqciwqvhk\",\"changeType\":\"create\",\"children\":[{\"path\":\"igdtopbob\",\"changeType\":\"modify\"},{\"path\":\"ghmewuam\",\"changeType\":\"modify\"},{\"path\":\"hrzayvvtpgvdf\",\"changeType\":\"noEffect\"},{\"path\":\"otkftutqxlngx\",\"changeType\":\"array\"}]},{\"before\":\"datagug\",\"after\":\"datakrxd\",\"path\":\"mi\",\"changeType\":\"modify\",\"children\":[{\"path\":\"zrvqdr\",\"changeType\":\"create\"},{\"path\":\"hjybigehoqfbo\",\"changeType\":\"array\"}]}]}]},\"deploymentScopeChange\":{\"before\":\"nyktzlcuiy\",\"after\":\"qyw\"}}") .toObject(DeploymentStacksWhatIfChange.class); - Assertions.assertEquals("cnpqxuhivyqniwby", model.resourceChanges().get(0).deploymentId()); - Assertions.assertEquals("k", model.resourceChanges().get(0).symbolicName()); - Assertions.assertEquals(DeploymentStacksWhatIfChangeType.DELETE, model.resourceChanges().get(0).changeType()); - Assertions.assertEquals(DeploymentStacksWhatIfChangeCertainty.POTENTIAL, + Assertions.assertEquals("xj", model.resourceChanges().get(0).deploymentId()); + Assertions.assertEquals("r", model.resourceChanges().get(0).symbolicName()); + Assertions.assertEquals(DeploymentStacksWhatIfChangeType.NO_CHANGE, + model.resourceChanges().get(0).changeType()); + Assertions.assertEquals(DeploymentStacksWhatIfChangeCertainty.DEFINITE, model.resourceChanges().get(0).changeCertainty()); - Assertions.assertEquals(DeploymentStacksManagementStatus.MANAGED, + Assertions.assertEquals(DeploymentStacksManagementStatus.UNKNOWN, model.resourceChanges().get(0).managementStatusChange().before()); - Assertions.assertEquals(DeploymentStacksManagementStatus.UNMANAGED, + Assertions.assertEquals(DeploymentStacksManagementStatus.UNKNOWN, model.resourceChanges().get(0).managementStatusChange().after()); - Assertions.assertEquals(DenyStatusMode.UNKNOWN, model.resourceChanges().get(0).denyStatusChange().before()); - Assertions.assertEquals(DenyStatusMode.DENY_WRITE_AND_DELETE, - model.resourceChanges().get(0).denyStatusChange().after()); - Assertions.assertEquals("xgaudccs", model.resourceChanges().get(0).unsupportedReason()); - Assertions.assertEquals("kryhtnapczwlokj", + Assertions.assertEquals(DenyStatusMode.NONE, model.resourceChanges().get(0).denyStatusChange().before()); + Assertions.assertEquals(DenyStatusMode.DENY_DELETE, model.resourceChanges().get(0).denyStatusChange().after()); + Assertions.assertEquals("datscmd", model.resourceChanges().get(0).unsupportedReason()); + Assertions.assertEquals("ognarxzxtheotus", model.resourceChanges().get(0).resourceConfigurationChanges().delta().get(0).path()); - Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.NO_EFFECT, + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, model.resourceChanges().get(0).resourceConfigurationChanges().delta().get(0).changeType()); - Assertions.assertEquals("kvnipjoxz", + Assertions.assertEquals("v", model.resourceChanges().get(0).resourceConfigurationChanges().delta().get(0).children().get(0).path()); Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, model.resourceChanges() @@ -48,25 +48,25 @@ public void testDeserialize() throws Exception { .children() .get(0) .changeType()); - Assertions.assertEquals(DenySettingsMode.NONE, model.denySettingsChange().before().mode()); - Assertions.assertEquals("dosvqwhbmdgbbjf", model.denySettingsChange().before().excludedPrincipals().get(0)); - Assertions.assertEquals("xppbhtqqro", model.denySettingsChange().before().excludedActions().get(0)); + Assertions.assertEquals(DenySettingsMode.DENY_DELETE, model.denySettingsChange().before().mode()); + Assertions.assertEquals("ufizuckyf", model.denySettingsChange().before().excludedPrincipals().get(0)); + Assertions.assertEquals("fidfvzw", model.denySettingsChange().before().excludedActions().get(0)); Assertions.assertFalse(model.denySettingsChange().before().applyToChildScopes()); Assertions.assertEquals(DenySettingsMode.DENY_WRITE_AND_DELETE, model.denySettingsChange().after().mode()); - Assertions.assertEquals("lgbquxig", model.denySettingsChange().after().excludedPrincipals().get(0)); - Assertions.assertEquals("yxwjkcp", model.denySettingsChange().after().excludedActions().get(0)); - Assertions.assertTrue(model.denySettingsChange().after().applyToChildScopes()); - Assertions.assertEquals("itnwuizgazxufi", model.denySettingsChange().delta().get(0).path()); + Assertions.assertEquals("xdcu", model.denySettingsChange().after().excludedPrincipals().get(0)); + Assertions.assertEquals("bzsgfyccsne", model.denySettingsChange().after().excludedActions().get(0)); + Assertions.assertFalse(model.denySettingsChange().after().applyToChildScopes()); + Assertions.assertEquals("hc", model.denySettingsChange().delta().get(0).path()); Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.CREATE, model.denySettingsChange().delta().get(0).changeType()); - Assertions.assertEquals("i", model.denySettingsChange().delta().get(0).children().get(0).path()); - Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.CREATE, + Assertions.assertEquals("pjxsqwpgrjbznor", model.denySettingsChange().delta().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.NO_EFFECT, model.denySettingsChange().delta().get(0).children().get(0).changeType()); - Assertions.assertEquals("dfvzwdzuhty", + Assertions.assertEquals("snb", model.denySettingsChange().delta().get(0).children().get(0).children().get(0).path()); - Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.ARRAY, + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, model.denySettingsChange().delta().get(0).children().get(0).children().get(0).changeType()); - Assertions.assertEquals("rhcffcydd", model.deploymentScopeChange().before()); - Assertions.assertEquals("mjthjqkwp", model.deploymentScopeChange().after()); + Assertions.assertEquals("nyktzlcuiy", model.deploymentScopeChange().before()); + Assertions.assertEquals("qyw", model.deploymentScopeChange().after()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfPropertyChangeTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfPropertyChangeTests.java index 1809f2f386f0..14ea72f9990e 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfPropertyChangeTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfPropertyChangeTests.java @@ -13,17 +13,17 @@ public final class DeploymentStacksWhatIfPropertyChangeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentStacksWhatIfPropertyChange model = BinaryData.fromString( - "{\"path\":\"gdtjixhbkuofqwey\",\"changeType\":\"delete\",\"children\":[{\"path\":\"vfyexfw\",\"changeType\":\"array\",\"children\":[{\"path\":\"vyvdcs\",\"changeType\":\"array\",\"children\":[{\"path\":\"naamde\",\"changeType\":\"array\"},{\"path\":\"eh\",\"changeType\":\"noEffect\"},{\"path\":\"qsc\",\"changeType\":\"delete\"},{\"path\":\"ypvhezrkg\",\"changeType\":\"create\"}]},{\"path\":\"refovgmkqsleyyvx\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"k\",\"changeType\":\"delete\"}]},{\"path\":\"pngjcrcczsqpjhvm\",\"changeType\":\"array\",\"children\":[{\"path\":\"nysounqe\",\"changeType\":\"modify\"}]},{\"path\":\"ae\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"yhltrpmopjmcm\",\"changeType\":\"noEffect\"}]}]},{\"path\":\"kthfui\",\"changeType\":\"create\",\"children\":[{\"path\":\"cpkvxodp\",\"changeType\":\"array\",\"children\":[{\"path\":\"yzydagfuaxbezyi\",\"changeType\":\"modify\"},{\"path\":\"kktwhrdxw\",\"changeType\":\"noEffect\"},{\"path\":\"wqsmbsur\",\"changeType\":\"delete\"},{\"path\":\"imoryocfsfksym\",\"changeType\":\"delete\"}]},{\"path\":\"tki\",\"changeType\":\"create\",\"children\":[{\"path\":\"qyud\",\"changeType\":\"delete\"},{\"path\":\"rrqnbpoczvyifqrv\",\"changeType\":\"array\"},{\"path\":\"vjsllrmvvdfw\",\"changeType\":\"noEffect\"},{\"path\":\"kpnpulexxbczwtr\",\"changeType\":\"noEffect\"}]},{\"path\":\"zb\",\"changeType\":\"create\",\"children\":[{\"path\":\"ovm\",\"changeType\":\"modify\"},{\"path\":\"kacspkw\",\"changeType\":\"noEffect\"},{\"path\":\"zdobpxjmflbvvnch\",\"changeType\":\"array\"},{\"path\":\"cciw\",\"changeType\":\"modify\"}]},{\"path\":\"qkhr\",\"changeType\":\"modify\",\"children\":[{\"path\":\"wkuofoskghsauu\",\"changeType\":\"array\"},{\"path\":\"jmvxie\",\"changeType\":\"delete\"}]}]},{\"path\":\"idyjrrfbyaosvexc\",\"changeType\":\"delete\",\"children\":[{\"path\":\"hocohslkev\",\"changeType\":\"modify\",\"children\":[{\"path\":\"zfbuhf\",\"changeType\":\"array\"}]},{\"path\":\"x\",\"changeType\":\"modify\",\"children\":[{\"path\":\"iith\",\"changeType\":\"noEffect\"},{\"path\":\"m\",\"changeType\":\"delete\"},{\"path\":\"yvshxmz\",\"changeType\":\"array\"}]},{\"path\":\"oggigrxwburv\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"nspydptkoenkoukn\",\"changeType\":\"delete\"},{\"path\":\"dwtiukbldngkp\",\"changeType\":\"delete\"}]}]},{\"path\":\"azyxoegukg\",\"changeType\":\"modify\",\"children\":[{\"path\":\"gygev\",\"changeType\":\"delete\",\"children\":[{\"path\":\"yp\",\"changeType\":\"noEffect\"},{\"path\":\"bpizcdrqjsdpydn\",\"changeType\":\"noEffect\"},{\"path\":\"hxdeoejz\",\"changeType\":\"delete\"},{\"path\":\"w\",\"changeType\":\"modify\"}]},{\"path\":\"ttgzfbis\",\"changeType\":\"modify\",\"children\":[{\"path\":\"hajdeyeamdpha\",\"changeType\":\"noEffect\"}]},{\"path\":\"buxwgip\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"ow\",\"changeType\":\"array\"},{\"path\":\"shwankixzbinje\",\"changeType\":\"delete\"}]}]}]}") + "{\"before\":\"databurvjxxjnspy\",\"after\":\"datatko\",\"path\":\"nkoukn\",\"changeType\":\"delete\",\"children\":[{\"before\":\"dataiukbldngkpoci\",\"after\":\"dataz\",\"path\":\"xoegukgjnpiucgy\",\"changeType\":\"delete\",\"children\":[{\"before\":\"datantypmrbpizcdrqj\",\"after\":\"datapyd\",\"path\":\"fyhxde\",\"changeType\":\"delete\",\"children\":[{\"path\":\"icwifsjtt\",\"changeType\":\"create\"}]},{\"before\":\"databishcbkhajdeyea\",\"after\":\"datap\",\"path\":\"agalpbuxwgipwhon\",\"changeType\":\"modify\",\"children\":[{\"path\":\"shwankixzbinje\",\"changeType\":\"delete\"},{\"path\":\"ttmrywnuzoqf\",\"changeType\":\"noEffect\"},{\"path\":\"yqzrnkcqvyxlw\",\"changeType\":\"delete\"}]}]},{\"before\":\"datasicohoqqnwvlry\",\"after\":\"dataw\",\"path\":\"heun\",\"changeType\":\"array\",\"children\":[{\"before\":\"datayxzk\",\"after\":\"dataocukoklyax\",\"path\":\"conuqszfkbeype\",\"changeType\":\"array\",\"children\":[{\"path\":\"mwvvjektcxsenhw\",\"changeType\":\"array\"},{\"path\":\"s\",\"changeType\":\"noEffect\"}]},{\"before\":\"datazpwv\",\"after\":\"datadqgbiqylihkaetc\",\"path\":\"tvfcivfsn\",\"changeType\":\"noEffect\",\"children\":[{\"path\":\"ctq\",\"changeType\":\"noEffect\"},{\"path\":\"fbebrjcxer\",\"changeType\":\"delete\"},{\"path\":\"wutttxfvjrbi\",\"changeType\":\"delete\"}]},{\"before\":\"dataxepcyvahfn\",\"after\":\"datakyqxjvuujqgidokg\",\"path\":\"ljyoxgvcltb\",\"changeType\":\"array\",\"children\":[{\"path\":\"ghkjeszzhbi\",\"changeType\":\"delete\"}]}]},{\"before\":\"dataxfvgxbfsmxne\",\"after\":\"datapvecxgodeb\",\"path\":\"qkkrb\",\"changeType\":\"create\",\"children\":[{\"before\":\"datariwflzlfb\",\"after\":\"datapuz\",\"path\":\"cispnqzahmgkbr\",\"changeType\":\"create\",\"children\":[{\"path\":\"hibnuqqkpika\",\"changeType\":\"array\"},{\"path\":\"gvtqagnbuynh\",\"changeType\":\"delete\"}]},{\"before\":\"datagmebfsiarbutrcv\",\"after\":\"dataazzmhjrunmpxt\",\"path\":\"dbhrbnlankxm\",\"changeType\":\"create\",\"children\":[{\"path\":\"bhenbtkcxywnyt\",\"changeType\":\"modify\"}]},{\"before\":\"datayn\",\"after\":\"dataidybyxczf\",\"path\":\"lhaaxdbabp\",\"changeType\":\"modify\",\"children\":[{\"path\":\"qlfktsths\",\"changeType\":\"noEffect\"},{\"path\":\"ocmnyyazttbtwwrq\",\"changeType\":\"array\"},{\"path\":\"edckzywbiexzfey\",\"changeType\":\"array\"},{\"path\":\"axibxujw\",\"changeType\":\"create\"}]}]}]}") .toObject(DeploymentStacksWhatIfPropertyChange.class); - Assertions.assertEquals("gdtjixhbkuofqwey", model.path()); + Assertions.assertEquals("nkoukn", model.path()); Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, model.changeType()); - Assertions.assertEquals("vfyexfw", model.children().get(0).path()); - Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.ARRAY, model.children().get(0).changeType()); - Assertions.assertEquals("vyvdcs", model.children().get(0).children().get(0).path()); - Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.ARRAY, + Assertions.assertEquals("xoegukgjnpiucgy", model.children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, model.children().get(0).changeType()); + Assertions.assertEquals("fyhxde", model.children().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.DELETE, model.children().get(0).children().get(0).changeType()); - Assertions.assertEquals("naamde", model.children().get(0).children().get(0).children().get(0).path()); - Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.ARRAY, + Assertions.assertEquals("icwifsjtt", model.children().get(0).children().get(0).children().get(0).path()); + Assertions.assertEquals(DeploymentStacksWhatIfPropertyChangeType.CREATE, model.children().get(0).children().get(0).children().get(0).changeType()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupsDeleteWithResponseMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupsDeleteWithResponseMockTests.java index 1e6566d604fb..761774cbc34d 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupsDeleteWithResponseMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtManagementGroupsDeleteWithResponseMockTests.java @@ -30,9 +30,9 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.deploymentStacksWhatIfResultsAtManagementGroups() - .deleteWithResponse("c", "wxzvlvqhjkb", DeploymentStacksDeleteDetachEnum.DELETE, - DeploymentStacksDeleteDetachEnum.DETACH, DeploymentStacksDeleteDetachEnum.DELETE, - DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH, true, com.azure.core.util.Context.NONE); + .deleteWithResponse("n", "bglzpswi", DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksDeleteDetachEnum.DETACH, DeploymentStacksDeleteDetachEnum.DETACH, + DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH, false, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupsDeleteWithResponseMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupsDeleteWithResponseMockTests.java index 0f3c74fd0c56..50f2af2cff04 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupsDeleteWithResponseMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtResourceGroupsDeleteWithResponseMockTests.java @@ -30,9 +30,9 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.deploymentStacksWhatIfResultsAtResourceGroups() - .deleteWithResponse("c", "hmdua", DeploymentStacksDeleteDetachEnum.DELETE, - DeploymentStacksDeleteDetachEnum.DELETE, DeploymentStacksDeleteDetachEnum.DETACH, - DeploymentStacksResourcesWithoutDeleteSupportEnum.DETACH, true, com.azure.core.util.Context.NONE); + .deleteWithResponse("ol", "dahzxctobg", DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksDeleteDetachEnum.DETACH, DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksResourcesWithoutDeleteSupportEnum.FAIL, false, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionsDeleteWithResponseMockTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionsDeleteWithResponseMockTests.java index f7dd5d3b8074..28c2b43c47c0 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionsDeleteWithResponseMockTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/DeploymentStacksWhatIfResultsAtSubscriptionsDeleteWithResponseMockTests.java @@ -30,9 +30,9 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.deploymentStacksWhatIfResultsAtSubscriptions() - .deleteWithResponse("it", DeploymentStacksDeleteDetachEnum.DETACH, DeploymentStacksDeleteDetachEnum.DELETE, - DeploymentStacksDeleteDetachEnum.DELETE, DeploymentStacksResourcesWithoutDeleteSupportEnum.FAIL, false, - com.azure.core.util.Context.NONE); + .deleteWithResponse("hsqfsubcgjbirxbp", DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksDeleteDetachEnum.DETACH, DeploymentStacksDeleteDetachEnum.DELETE, + DeploymentStacksResourcesWithoutDeleteSupportEnum.FAIL, false, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ErrorAdditionalInfoTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ErrorAdditionalInfoTests.java index 399b7562e4b3..8f3142d4c457 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ErrorAdditionalInfoTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/ErrorAdditionalInfoTests.java @@ -10,7 +10,7 @@ public final class ErrorAdditionalInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ErrorAdditionalInfo model - = BinaryData.fromString("{\"type\":\"bejhphoycmsxa\"}").toObject(ErrorAdditionalInfo.class); + ErrorAdditionalInfo model = BinaryData.fromString("{\"type\":\"bejhphoycmsxa\",\"info\":\"datahdxbmtqio\"}") + .toObject(ErrorAdditionalInfo.class); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/KeyVaultReferenceTests.java b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/KeyVaultReferenceTests.java index c637507fd6be..9877c5fd07b8 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/KeyVaultReferenceTests.java +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/src/test/java/com/azure/resourcemanager/resources/deploymentstacks/generated/KeyVaultReferenceTests.java @@ -11,14 +11,14 @@ public final class KeyVaultReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - KeyVaultReference model = BinaryData.fromString("{\"id\":\"qqjnqgl\"}").toObject(KeyVaultReference.class); - Assertions.assertEquals("qqjnqgl", model.id()); + KeyVaultReference model = BinaryData.fromString("{\"id\":\"agdfmglzlh\"}").toObject(KeyVaultReference.class); + Assertions.assertEquals("agdfmglzlh", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - KeyVaultReference model = new KeyVaultReference().withId("qqjnqgl"); + KeyVaultReference model = new KeyVaultReference().withId("agdfmglzlh"); model = BinaryData.fromObject(model).toObject(KeyVaultReference.class); - Assertions.assertEquals("qqjnqgl", model.id()); + Assertions.assertEquals("agdfmglzlh", model.id()); } } diff --git a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/tsp-location.yaml b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/tsp-location.yaml index 3c8c37b66158..e3a355ca027c 100644 --- a/sdk/resources/azure-resourcemanager-resources-deploymentstacks/tsp-location.yaml +++ b/sdk/resources/azure-resourcemanager-resources-deploymentstacks/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/resources/resource-manager/Microsoft.Resources/deploymentStacks -commit: 652ad4cb131256f10a90ea2df207b38cf35d6671 +commit: 9762f2dd848f6955a855f5dbe8c4df8f4d5dfd66 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md b/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md index 29ddcf0a5f34..8769a451c730 100644 --- a/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md +++ b/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.54.0-beta.1 (Unreleased) +## 1.1.0 (Unreleased) ### Features Added diff --git a/sdk/resources/azure-resourcemanager-resources/README.md b/sdk/resources/azure-resourcemanager-resources/README.md index 28acacb1e9ad..314ac6bc94a3 100644 --- a/sdk/resources/azure-resourcemanager-resources/README.md +++ b/sdk/resources/azure-resourcemanager-resources/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-resources - 2.53.5 + 2.54.0-beta.1 ``` [//]: # ({x-version-update-end}) From 635355d9b3da3dba4a6aac7af08e9c9b1882c6a5 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 28 Jan 2026 15:07:34 +0800 Subject: [PATCH 4/4] revert for script bug --- sdk/resources/azure-resourcemanager-resources/CHANGELOG.md | 2 +- sdk/resources/azure-resourcemanager-resources/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md b/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md index 8769a451c730..29ddcf0a5f34 100644 --- a/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md +++ b/sdk/resources/azure-resourcemanager-resources/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.1.0 (Unreleased) +## 2.54.0-beta.1 (Unreleased) ### Features Added diff --git a/sdk/resources/azure-resourcemanager-resources/README.md b/sdk/resources/azure-resourcemanager-resources/README.md index 314ac6bc94a3..28acacb1e9ad 100644 --- a/sdk/resources/azure-resourcemanager-resources/README.md +++ b/sdk/resources/azure-resourcemanager-resources/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-resources - 2.54.0-beta.1 + 2.53.5 ``` [//]: # ({x-version-update-end})