diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/CHANGELOG.md b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/CHANGELOG.md
index f2e0cab9056e..12198f2cd28e 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/CHANGELOG.md
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2021-11-29)
+- Azure Resource Manager Deployment client library for Java. This package contains Microsoft Azure SDK for Deployment Management SDK. REST APIs for orchestrating deployments using the Azure Deployment Manager (ADM). See https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview for more information. Package tag package-2019-11-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2021-04-20)
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/README.md b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/README.md
index c0fb3888e4bb..baaa80434f5a 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/README.md
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Deployment client library for Java.
-This package contains Microsoft Azure SDK for Deployment Management SDK. REST APIs for orchestrating deployments using the Azure Deployment Manager (ADM). See https://docs.microsoft.com/azure/azure-resource-manager/deployment-manager-overview for more information. Package tag package-2019-11-01-preview. 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 Management SDK. REST APIs for orchestrating deployments using the Azure Deployment Manager (ADM). See https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview for more information. Package tag package-2019-11-01-preview. 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-deploymentmanager
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/SAMPLE.md b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/SAMPLE.md
new file mode 100644
index 000000000000..072bfa16ebe7
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/SAMPLE.md
@@ -0,0 +1,933 @@
+# Code snippets and samples
+
+
+## ArtifactSources
+
+- [CreateOrUpdate](#artifactsources_createorupdate)
+- [Delete](#artifactsources_delete)
+- [GetByResourceGroup](#artifactsources_getbyresourcegroup)
+- [List](#artifactsources_list)
+
+## Operations
+
+- [List](#operations_list)
+
+## Rollouts
+
+- [Cancel](#rollouts_cancel)
+- [CreateOrUpdate](#rollouts_createorupdate)
+- [Delete](#rollouts_delete)
+- [GetByResourceGroup](#rollouts_getbyresourcegroup)
+- [List](#rollouts_list)
+- [Restart](#rollouts_restart)
+
+## ServiceTopologies
+
+- [CreateOrUpdate](#servicetopologies_createorupdate)
+- [Delete](#servicetopologies_delete)
+- [GetByResourceGroup](#servicetopologies_getbyresourcegroup)
+- [List](#servicetopologies_list)
+
+## ServiceUnits
+
+- [CreateOrUpdate](#serviceunits_createorupdate)
+- [Delete](#serviceunits_delete)
+- [Get](#serviceunits_get)
+- [List](#serviceunits_list)
+
+## Services
+
+- [CreateOrUpdate](#services_createorupdate)
+- [Delete](#services_delete)
+- [Get](#services_get)
+- [List](#services_list)
+
+## Steps
+
+- [CreateOrUpdate](#steps_createorupdate)
+- [Delete](#steps_delete)
+- [GetByResourceGroup](#steps_getbyresourcegroup)
+- [List](#steps_list)
+### ArtifactSources_CreateOrUpdate
+
+```java
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ArtifactSources CreateOrUpdate. */
+public final class ArtifactSourcesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_createorupdate.json
+ */
+ /**
+ * Sample code: Create artifact source.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createArtifactSource(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .artifactSources()
+ .define("myArtifactSource")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withTags(mapOf())
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_createorupdate_artifactroot.json
+ */
+ /**
+ * Sample code: Create artifact source with artifact root, an offset into the storage container.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createArtifactSourceWithArtifactRootAnOffsetIntoTheStorageContainer(
+ com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .artifactSources()
+ .define("myArtifactSource")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withTags(mapOf())
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### ArtifactSources_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ArtifactSources Delete. */
+public final class ArtifactSourcesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_delete.json
+ */
+ /**
+ * Sample code: Delete artifact source.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void deleteArtifactSource(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.artifactSources().deleteWithResponse("myResourceGroup", "myArtifactSource", Context.NONE);
+ }
+}
+```
+
+### ArtifactSources_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ArtifactSources GetByResourceGroup. */
+public final class ArtifactSourcesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_get.json
+ */
+ /**
+ * Sample code: Get artifact source.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getArtifactSource(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.artifactSources().getByResourceGroupWithResponse("myResourceGroup", "myArtifactSource", Context.NONE);
+ }
+}
+```
+
+### ArtifactSources_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ArtifactSources List. */
+public final class ArtifactSourcesListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsources_list.json
+ */
+ /**
+ * Sample code: List steps.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void listSteps(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.artifactSources().listWithResponse("myResourceGroup", Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/operations_list.json
+ */
+ /**
+ * Sample code: Get operations.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getOperations(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.operations().listWithResponse(Context.NONE);
+ }
+}
+```
+
+### Rollouts_Cancel
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Rollouts Cancel. */
+public final class RolloutsCancelSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_post_cancel.json
+ */
+ /**
+ * Sample code: Cancel rollout.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void cancelRollout(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.rollouts().cancelWithResponse("myResourceGroup", "myRollout", Context.NONE);
+ }
+}
+```
+
+### Rollouts_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.deploymentmanager.models.Identity;
+import com.azure.resourcemanager.deploymentmanager.models.PrePostStep;
+import com.azure.resourcemanager.deploymentmanager.models.StepGroup;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Rollouts CreateOrUpdate. */
+public final class RolloutsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_createorupdate.json
+ */
+ /**
+ * Sample code: Create or update rollout.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createOrUpdateRollout(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .rollouts()
+ .define("myRollout")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withIdentity(
+ new Identity()
+ .withType("userAssigned")
+ .withIdentityIds(
+ Arrays
+ .asList(
+ "/subscriptions/caac1590-e859-444f-a9e0-62091c0f5929/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userassignedidentities/myuseridentity")))
+ .withBuildVersion("1.0.0.1")
+ .withTargetServiceTopologyId(
+ "/subscriptions/caac1590-e859-444f-a9e0-62091c0f5929/resourceGroups/myResourceGroup/Microsoft.DeploymentManager/serviceTopologies/myTopology")
+ .withStepGroups(
+ Arrays
+ .asList(
+ new StepGroup()
+ .withName("FirstRegion")
+ .withPreDeploymentSteps(
+ Arrays
+ .asList(
+ new PrePostStep()
+ .withStepId("Microsoft.DeploymentManager/steps/preDeployStep1"),
+ new PrePostStep()
+ .withStepId("Microsoft.DeploymentManager/steps/preDeployStep2")))
+ .withDeploymentTargetId(
+ "Microsoft.DeploymentManager/serviceTopologies/myTopology/services/myService/serviceUnits/myServiceUnit1'")
+ .withPostDeploymentSteps(
+ Arrays
+ .asList(
+ new PrePostStep()
+ .withStepId("Microsoft.DeploymentManager/steps/postDeployStep1"))),
+ new StepGroup()
+ .withName("SecondRegion")
+ .withDependsOnStepGroups(Arrays.asList("FirstRegion"))
+ .withPreDeploymentSteps(
+ Arrays
+ .asList(
+ new PrePostStep()
+ .withStepId("Microsoft.DeploymentManager/steps/preDeployStep3"),
+ new PrePostStep()
+ .withStepId("Microsoft.DeploymentManager/steps/preDeployStep4")))
+ .withDeploymentTargetId(
+ "Microsoft.DeploymentManager/serviceTopologies/myTopology/services/myService/serviceUnits/myServiceUnit2'")
+ .withPostDeploymentSteps(
+ Arrays
+ .asList(
+ new PrePostStep()
+ .withStepId("Microsoft.DeploymentManager/steps/postDeployStep5")))))
+ .withTags(mapOf())
+ .withArtifactSourceId(
+ "/subscriptions/caac1590-e859-444f-a9e0-62091c0f5929/resourceGroups/myResourceGroup/Microsoft.DeploymentManager/artifactSources/myArtifactSource")
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Rollouts_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Rollouts Delete. */
+public final class RolloutsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_delete.json
+ */
+ /**
+ * Sample code: Delete rollout.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void deleteRollout(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.rollouts().deleteWithResponse("myResourceGroup", "myRollout", Context.NONE);
+ }
+}
+```
+
+### Rollouts_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Rollouts GetByResourceGroup. */
+public final class RolloutsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_get.json
+ */
+ /**
+ * Sample code: Get rollout.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getRollout(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.rollouts().getByResourceGroupWithResponse("myResourceGroup", "myRollout", null, Context.NONE);
+ }
+}
+```
+
+### Rollouts_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Rollouts List. */
+public final class RolloutsListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollouts_list.json
+ */
+ /**
+ * Sample code: List rollouts by resource group.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void listRolloutsByResourceGroup(
+ com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.rollouts().listWithResponse("myResourceGroup", Context.NONE);
+ }
+}
+```
+
+### Rollouts_Restart
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Rollouts Restart. */
+public final class RolloutsRestartSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_post_restart.json
+ */
+ /**
+ * Sample code: Restart rollout.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void restartRollout(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.rollouts().restartWithResponse("myResourceGroup", "myRollout", true, Context.NONE);
+ }
+}
+```
+
+### ServiceTopologies_CreateOrUpdate
+
+```java
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ServiceTopologies CreateOrUpdate. */
+public final class ServiceTopologiesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_createorupdate.json
+ */
+ /**
+ * Sample code: Create a topology with Artifact Source.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createATopologyWithArtifactSource(
+ com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .serviceTopologies()
+ .define("myTopology")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withTags(mapOf())
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_createorupdate_noartifactsource.json
+ */
+ /**
+ * Sample code: Create a topology without Artifact Source.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createATopologyWithoutArtifactSource(
+ com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .serviceTopologies()
+ .define("myTopology")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withTags(mapOf())
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### ServiceTopologies_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceTopologies Delete. */
+public final class ServiceTopologiesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_delete.json
+ */
+ /**
+ * Sample code: Delete topology.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void deleteTopology(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.serviceTopologies().deleteWithResponse("myResourceGroup", "myTopology", Context.NONE);
+ }
+}
+```
+
+### ServiceTopologies_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceTopologies GetByResourceGroup. */
+public final class ServiceTopologiesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_get.json
+ */
+ /**
+ * Sample code: Get topology.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getTopology(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.serviceTopologies().getByResourceGroupWithResponse("myResourceGroup", "myTopology", Context.NONE);
+ }
+}
+```
+
+### ServiceTopologies_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceTopologies List. */
+public final class ServiceTopologiesListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopologies_list.json
+ */
+ /**
+ * Sample code: List topologies.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void listTopologies(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.serviceTopologies().listWithResponse("myResourceGroup", Context.NONE);
+ }
+}
+```
+
+### ServiceUnits_CreateOrUpdate
+
+```java
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ServiceUnits CreateOrUpdate. */
+public final class ServiceUnitsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_createorupdate.json
+ */
+ /**
+ * Sample code: Create service unit using relative paths into the artifact source.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createServiceUnitUsingRelativePathsIntoTheArtifactSource(
+ com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .serviceUnits()
+ .define("myServiceUnit")
+ .withRegion("centralus")
+ .withExistingService("myResourceGroup", "myTopology", "myService")
+ .withTags(mapOf())
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_createorupdate_noartifactsource.json
+ */
+ /**
+ * Sample code: Create service unit using SAS URIs.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createServiceUnitUsingSASURIs(
+ com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .serviceUnits()
+ .define("myServiceUnit")
+ .withRegion("centralus")
+ .withExistingService("myResourceGroup", "myTopology", "myService")
+ .withTags(mapOf())
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### ServiceUnits_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceUnits Delete. */
+public final class ServiceUnitsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_delete.json
+ */
+ /**
+ * Sample code: Delete service unit.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void deleteServiceUnit(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .serviceUnits()
+ .deleteWithResponse("myResourceGroup", "myTopology", "myService", "myServiceUnit", Context.NONE);
+ }
+}
+```
+
+### ServiceUnits_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceUnits Get. */
+public final class ServiceUnitsGetSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_get.json
+ */
+ /**
+ * Sample code: Get service unit.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getServiceUnit(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .serviceUnits()
+ .getWithResponse("myResourceGroup", "myTopology", "myService", "myServiceUnit", Context.NONE);
+ }
+}
+```
+
+### ServiceUnits_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceUnits List. */
+public final class ServiceUnitsListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunits_list.json
+ */
+ /**
+ * Sample code: List service units.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void listServiceUnits(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.serviceUnits().listWithResponse("myResourceGroup", "myTopology", "myService", Context.NONE);
+ }
+}
+```
+
+### Services_CreateOrUpdate
+
+```java
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Services CreateOrUpdate. */
+public final class ServicesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/service_createorupdate.json
+ */
+ /**
+ * Sample code: Create service.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createService(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .services()
+ .define("myService")
+ .withRegion("centralus")
+ .withExistingServiceTopology("myResourceGroup", "myTopology")
+ .withTags(mapOf())
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Services_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services Delete. */
+public final class ServicesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/service_delete.json
+ */
+ /**
+ * Sample code: Delete service.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void deleteService(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.services().deleteWithResponse("myResourceGroup", "myTopology", "myService", Context.NONE);
+ }
+}
+```
+
+### Services_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services Get. */
+public final class ServicesGetSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/service_get.json
+ */
+ /**
+ * Sample code: Get service.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getService(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.services().getWithResponse("myResourceGroup", "myTopology", "myService", Context.NONE);
+ }
+}
+```
+
+### Services_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services List. */
+public final class ServicesListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/services_list.json
+ */
+ /**
+ * Sample code: List services.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void listServices(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.services().listWithResponse("myResourceGroup", "myTopology", Context.NONE);
+ }
+}
+```
+
+### Steps_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.deploymentmanager.models.ApiKeyAuthentication;
+import com.azure.resourcemanager.deploymentmanager.models.HealthCheckStepProperties;
+import com.azure.resourcemanager.deploymentmanager.models.RestAuthLocation;
+import com.azure.resourcemanager.deploymentmanager.models.RestHealthCheck;
+import com.azure.resourcemanager.deploymentmanager.models.RestHealthCheckStepAttributes;
+import com.azure.resourcemanager.deploymentmanager.models.RestMatchQuantifier;
+import com.azure.resourcemanager.deploymentmanager.models.RestRequest;
+import com.azure.resourcemanager.deploymentmanager.models.RestRequestMethod;
+import com.azure.resourcemanager.deploymentmanager.models.RestResponse;
+import com.azure.resourcemanager.deploymentmanager.models.RestResponseRegex;
+import com.azure.resourcemanager.deploymentmanager.models.WaitStepAttributes;
+import com.azure.resourcemanager.deploymentmanager.models.WaitStepProperties;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Steps CreateOrUpdate. */
+public final class StepsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_health_check_createorupdate.json
+ */
+ /**
+ * Sample code: Create health check step.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createHealthCheckStep(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .steps()
+ .define("healthCheckStep")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withProperties(
+ new HealthCheckStepProperties()
+ .withAttributes(
+ new RestHealthCheckStepAttributes()
+ .withWaitDuration("PT15M")
+ .withMaxElasticDuration("PT30M")
+ .withHealthyStateDuration("PT2H")
+ .withHealthChecks(
+ Arrays
+ .asList(
+ new RestHealthCheck()
+ .withName("appHealth")
+ .withRequest(
+ new RestRequest()
+ .withMethod(RestRequestMethod.GET)
+ .withUri(
+ "https://resthealth.healthservice.com/api/applications/contosoApp/healthStatus")
+ .withAuthentication(
+ new ApiKeyAuthentication()
+ .withName("Code")
+ .withIn(RestAuthLocation.QUERY)
+ .withValue(
+ "NBCapiMOBQyAAbCkeytoPadnvO0eGHmidwFz5rXpappznKp3Jt7LLg==")))
+ .withResponse(
+ new RestResponse()
+ .withSuccessStatusCodes(Arrays.asList("OK"))
+ .withRegex(
+ new RestResponseRegex()
+ .withMatches(
+ Arrays
+ .asList(
+ "(?i)Contoso-App",
+ "(?i)\"health_status\":((.|\n"
+ + ")*)\"(green|yellow)\"",
+ "(?mi)^(\"application_host\": 94781052)$"))
+ .withMatchQuantifier(RestMatchQuantifier.ALL))),
+ new RestHealthCheck()
+ .withName("serviceHealth")
+ .withRequest(
+ new RestRequest()
+ .withMethod(RestRequestMethod.GET)
+ .withUri(
+ "https://resthealth.healthservice.com/api/services/contosoService/healthStatus")
+ .withAuthentication(
+ new ApiKeyAuthentication()
+ .withName("code")
+ .withIn(RestAuthLocation.HEADER)
+ .withValue(
+ "NBCapiMOBQyAAbCkeytoPadnvO0eGHmidwFz5rXpappznKp3Jt7LLg==")))
+ .withResponse(
+ new RestResponse()
+ .withSuccessStatusCodes(Arrays.asList("OK"))
+ .withRegex(
+ new RestResponseRegex()
+ .withMatches(
+ Arrays
+ .asList(
+ "(?i)Contoso-Service-EndToEnd",
+ "(?i)\"health_status\":((.|\n)*)\"(green)\""))
+ .withMatchQuantifier(RestMatchQuantifier.ALL)))))))
+ .withTags(mapOf())
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_wait_createorupdate.json
+ */
+ /**
+ * Sample code: Create wait step.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createWaitStep(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .steps()
+ .define("waitStep")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withProperties(new WaitStepProperties().withAttributes(new WaitStepAttributes().withDuration("PT20M")))
+ .withTags(mapOf())
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Steps_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Steps Delete. */
+public final class StepsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_delete.json
+ */
+ /**
+ * Sample code: Delete deployment step.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void deleteDeploymentStep(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.steps().deleteWithResponse("myResourceGroup", "deploymentStep1", Context.NONE);
+ }
+}
+```
+
+### Steps_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Steps GetByResourceGroup. */
+public final class StepsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_get.json
+ */
+ /**
+ * Sample code: Get deployment step.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getDeploymentStep(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.steps().getByResourceGroupWithResponse("myResourceGroup", "waitStep", Context.NONE);
+ }
+}
+```
+
+### Steps_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Steps List. */
+public final class StepsListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/steps_list.json
+ */
+ /**
+ * Sample code: List steps.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void listSteps(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.steps().listWithResponse("myResourceGroup", Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml
index 5de9a5f96ef5..da94ca46fc27 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml
@@ -1,58 +1,81 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-deploymentmanager
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-deploymentmanager
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for Deployment Management
- This package contains Microsoft Azure SDK for Deployment Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST APIs for orchestrating deployments using the Azure Deployment Manager (ADM). See https://docs.microsoft.com/azure/azure-resource-manager/deployment-manager-overview for more information. Package tag package-2019-11-01-preview.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for Deployment Management
+ This package contains Microsoft Azure SDK for Deployment Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST APIs for orchestrating deployments using the Azure Deployment Manager (ADM). See https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview for more information. Package tag package-2019-11-01-preview.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
false
-
-
-
- com.azure
- azure-core
- 1.22.0
-
-
- com.azure
- azure-core-management
- 1.4.3
-
-
+
+
+
+ com.azure
+ azure-core
+ 1.22.0
+
+
+ com.azure
+ azure-core-management
+ 1.4.3
+
+
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/DeploymentManager.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/DeploymentManager.java
index f0117a01b797..76c29cabfed4 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/DeploymentManager.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/DeploymentManager.java
@@ -8,8 +8,8 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,6 +17,7 @@
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -41,10 +42,11 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/**
* Entry point to DeploymentManager. REST APIs for orchestrating deployments using the Azure Deployment Manager (ADM).
- * See https://docs.microsoft.com/azure/azure-resource-manager/deployment-manager-overview for more information.
+ * See https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview for more information.
*/
public final class DeploymentManager {
private ServiceTopologies serviceTopologies;
@@ -104,6 +106,7 @@ public static final class Configurable {
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -143,6 +146,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -199,20 +213,33 @@ public DeploymentManager authenticate(TokenCredential credential, AzureProfile p
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/RolloutsClient.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/RolloutsClient.java
index e1161735dd62..e06c27d7c3f4 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/RolloutsClient.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/RolloutsClient.java
@@ -28,7 +28,7 @@ public interface RolloutsClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return defines the PUT rollout request body.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, RolloutRequestInner> beginCreateOrUpdate(
String resourceGroupName, String rolloutName, RolloutRequestInner rolloutRequest);
@@ -45,7 +45,7 @@ SyncPoller, RolloutRequestInner> beginCreateOrUp
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return defines the PUT rollout request body.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, RolloutRequestInner> beginCreateOrUpdate(
String resourceGroupName, String rolloutName, RolloutRequestInner rolloutRequest, Context context);
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ServiceUnitsClient.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ServiceUnitsClient.java
index e18a0cc4ba7d..7646d91ffaee 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ServiceUnitsClient.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ServiceUnitsClient.java
@@ -29,7 +29,7 @@ public interface ServiceUnitsClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents the response of a service unit resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ServiceUnitResourceInner> beginCreateOrUpdate(
String resourceGroupName,
String serviceTopologyName,
@@ -52,7 +52,7 @@ SyncPoller, ServiceUnitResourceInner> begin
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents the response of a service unit resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ServiceUnitResourceInner> beginCreateOrUpdate(
String resourceGroupName,
String serviceTopologyName,
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ArtifactSourceInner.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ArtifactSourceInner.java
index 18bf9a1f0d75..ff45a5da22b3 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ArtifactSourceInner.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ArtifactSourceInner.java
@@ -5,110 +5,30 @@
package com.azure.resourcemanager.deploymentmanager.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.deploymentmanager.models.Authentication;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** The resource that defines the source location where the artifacts are located. */
-@JsonFlatten
@Fluent
-public class ArtifactSourceInner extends Resource {
+public final class ArtifactSourceInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactSourceInner.class);
/*
- * The type of artifact source used.
+ * The properties that define the artifact source.
*/
- @JsonProperty(value = "properties.sourceType")
- private String sourceType;
-
- /*
- * The path from the location that the 'authentication' property [say, a
- * SAS URI to the blob container] refers to, to the location of the
- * artifacts. This can be used to differentiate different versions of the
- * artifacts. Or, different types of artifacts like binaries or templates.
- * The location referenced by the authentication property concatenated with
- * this optional artifactRoot path forms the artifact source location where
- * the artifacts are expected to be found.
- */
- @JsonProperty(value = "properties.artifactRoot")
- private String artifactRoot;
-
- /*
- * The authentication method to use to access the artifact source.
- */
- @JsonProperty(value = "properties.authentication")
- private Authentication authentication;
-
- /**
- * Get the sourceType property: The type of artifact source used.
- *
- * @return the sourceType value.
- */
- public String sourceType() {
- return this.sourceType;
- }
-
- /**
- * Set the sourceType property: The type of artifact source used.
- *
- * @param sourceType the sourceType value to set.
- * @return the ArtifactSourceInner object itself.
- */
- public ArtifactSourceInner withSourceType(String sourceType) {
- this.sourceType = sourceType;
- return this;
- }
+ @JsonProperty(value = "properties")
+ private ArtifactSourceProperties innerProperties;
/**
- * Get the artifactRoot property: The path from the location that the 'authentication' property [say, a SAS URI to
- * the blob container] refers to, to the location of the artifacts. This can be used to differentiate different
- * versions of the artifacts. Or, different types of artifacts like binaries or templates. The location referenced
- * by the authentication property concatenated with this optional artifactRoot path forms the artifact source
- * location where the artifacts are expected to be found.
+ * Get the innerProperties property: The properties that define the artifact source.
*
- * @return the artifactRoot value.
+ * @return the innerProperties value.
*/
- public String artifactRoot() {
- return this.artifactRoot;
- }
-
- /**
- * Set the artifactRoot property: The path from the location that the 'authentication' property [say, a SAS URI to
- * the blob container] refers to, to the location of the artifacts. This can be used to differentiate different
- * versions of the artifacts. Or, different types of artifacts like binaries or templates. The location referenced
- * by the authentication property concatenated with this optional artifactRoot path forms the artifact source
- * location where the artifacts are expected to be found.
- *
- * @param artifactRoot the artifactRoot value to set.
- * @return the ArtifactSourceInner object itself.
- */
- public ArtifactSourceInner withArtifactRoot(String artifactRoot) {
- this.artifactRoot = artifactRoot;
- return this;
- }
-
- /**
- * Get the authentication property: The authentication method to use to access the artifact source.
- *
- * @return the authentication value.
- */
- public Authentication authentication() {
- return this.authentication;
- }
-
- /**
- * Set the authentication property: The authentication method to use to access the artifact source.
- *
- * @param authentication the authentication value to set.
- * @return the ArtifactSourceInner object itself.
- */
- public ArtifactSourceInner withAuthentication(Authentication authentication) {
- this.authentication = authentication;
- return this;
+ private ArtifactSourceProperties innerProperties() {
+ return this.innerProperties;
}
/** {@inheritDoc} */
@@ -131,8 +51,8 @@ public ArtifactSourceInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (authentication() != null) {
- authentication().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ArtifactSourceProperties.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ArtifactSourceProperties.java
similarity index 81%
rename from sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ArtifactSourceProperties.java
rename to sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ArtifactSourceProperties.java
index 6bc1870776d6..900c23f1068c 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ArtifactSourceProperties.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ArtifactSourceProperties.java
@@ -2,14 +2,16 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.deploymentmanager.models;
+package com.azure.resourcemanager.deploymentmanager.fluent.models;
-import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.deploymentmanager.models.ArtifactSourcePropertiesAutoGenerated;
+import com.azure.resourcemanager.deploymentmanager.models.Authentication;
import com.fasterxml.jackson.annotation.JsonIgnore;
/** The properties that define the artifact source. */
-@Immutable
+@Fluent
public final class ArtifactSourceProperties extends ArtifactSourcePropertiesAutoGenerated {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactSourceProperties.class);
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RestParameters.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RestParameters.java
new file mode 100644
index 000000000000..24856765444b
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RestParameters.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.deploymentmanager.models.RestHealthCheck;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The parameters for the REST health check. */
+@Fluent
+public final class RestParameters {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RestParameters.class);
+
+ /*
+ * The list of checks that form the health check step.
+ */
+ @JsonProperty(value = "healthChecks", required = true)
+ private List healthChecks;
+
+ /**
+ * Get the healthChecks property: The list of checks that form the health check step.
+ *
+ * @return the healthChecks value.
+ */
+ public List healthChecks() {
+ return this.healthChecks;
+ }
+
+ /**
+ * Set the healthChecks property: The list of checks that form the health check step.
+ *
+ * @param healthChecks the healthChecks value to set.
+ * @return the RestParameters object itself.
+ */
+ public RestParameters withHealthChecks(List healthChecks) {
+ this.healthChecks = healthChecks;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (healthChecks() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property healthChecks in model RestParameters"));
+ } else {
+ healthChecks().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutInner.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutInner.java
index 16bf84f5e31a..d883b368bbc9 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutInner.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.deploymentmanager.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.deploymentmanager.models.Identity;
@@ -18,9 +17,8 @@
import java.util.Map;
/** Defines the rollout. */
-@JsonFlatten
@Fluent
-public class RolloutInner extends Resource {
+public final class RolloutInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(RolloutInner.class);
/*
@@ -30,74 +28,89 @@ public class RolloutInner extends Resource {
private Identity identity;
/*
- * The version of the build being deployed.
+ * The properties that define a rollout.
*/
- @JsonProperty(value = "properties.buildVersion")
- private String buildVersion;
+ @JsonProperty(value = "properties")
+ private RolloutProperties innerProperties;
- /*
- * The reference to the artifact source resource Id where the payload is
- * located.
+ /**
+ * Get the identity property: Identity for the resource.
+ *
+ * @return the identity value.
*/
- @JsonProperty(value = "properties.artifactSourceId")
- private String artifactSourceId;
+ public Identity identity() {
+ return this.identity;
+ }
- /*
- * The resource Id of the service topology from which service units are
- * being referenced in step groups to be deployed.
+ /**
+ * Set the identity property: Identity for the resource.
+ *
+ * @param identity the identity value to set.
+ * @return the RolloutInner object itself.
*/
- @JsonProperty(value = "properties.targetServiceTopologyId")
- private String targetServiceTopologyId;
+ public RolloutInner withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
- /*
- * The list of step groups that define the orchestration.
+ /**
+ * Get the innerProperties property: The properties that define a rollout.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.stepGroups")
- private List stepGroups;
+ private RolloutProperties innerProperties() {
+ return this.innerProperties;
+ }
- /*
- * The current status of the rollout.
- */
- @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
- private String status;
+ /** {@inheritDoc} */
+ @Override
+ public RolloutInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
- /*
- * The cardinal count of total number of retries performed on the rollout
- * at a given time.
- */
- @JsonProperty(value = "properties.totalRetryAttempts", access = JsonProperty.Access.WRITE_ONLY)
- private Integer totalRetryAttempts;
+ /** {@inheritDoc} */
+ @Override
+ public RolloutInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
- /*
- * Operational information of the rollout.
+ /**
+ * Get the status property: The current status of the rollout.
+ *
+ * @return the status value.
*/
- @JsonProperty(value = "properties.operationInfo", access = JsonProperty.Access.WRITE_ONLY)
- private RolloutOperationInfo operationInfo;
+ public String status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
- /*
- * The detailed information on the services being deployed.
+ /**
+ * Get the totalRetryAttempts property: The cardinal count of total number of retries performed on the rollout at a
+ * given time.
+ *
+ * @return the totalRetryAttempts value.
*/
- @JsonProperty(value = "properties.services", access = JsonProperty.Access.WRITE_ONLY)
- private List services;
+ public Integer totalRetryAttempts() {
+ return this.innerProperties() == null ? null : this.innerProperties().totalRetryAttempts();
+ }
/**
- * Get the identity property: Identity for the resource.
+ * Get the operationInfo property: Operational information of the rollout.
*
- * @return the identity value.
+ * @return the operationInfo value.
*/
- public Identity identity() {
- return this.identity;
+ public RolloutOperationInfo operationInfo() {
+ return this.innerProperties() == null ? null : this.innerProperties().operationInfo();
}
/**
- * Set the identity property: Identity for the resource.
+ * Get the services property: The detailed information on the services being deployed.
*
- * @param identity the identity value to set.
- * @return the RolloutInner object itself.
+ * @return the services value.
*/
- public RolloutInner withIdentity(Identity identity) {
- this.identity = identity;
- return this;
+ public List services() {
+ return this.innerProperties() == null ? null : this.innerProperties().services();
}
/**
@@ -106,7 +119,7 @@ public RolloutInner withIdentity(Identity identity) {
* @return the buildVersion value.
*/
public String buildVersion() {
- return this.buildVersion;
+ return this.innerProperties() == null ? null : this.innerProperties().buildVersion();
}
/**
@@ -116,7 +129,10 @@ public String buildVersion() {
* @return the RolloutInner object itself.
*/
public RolloutInner withBuildVersion(String buildVersion) {
- this.buildVersion = buildVersion;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RolloutProperties();
+ }
+ this.innerProperties().withBuildVersion(buildVersion);
return this;
}
@@ -126,7 +142,7 @@ public RolloutInner withBuildVersion(String buildVersion) {
* @return the artifactSourceId value.
*/
public String artifactSourceId() {
- return this.artifactSourceId;
+ return this.innerProperties() == null ? null : this.innerProperties().artifactSourceId();
}
/**
@@ -136,7 +152,10 @@ public String artifactSourceId() {
* @return the RolloutInner object itself.
*/
public RolloutInner withArtifactSourceId(String artifactSourceId) {
- this.artifactSourceId = artifactSourceId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RolloutProperties();
+ }
+ this.innerProperties().withArtifactSourceId(artifactSourceId);
return this;
}
@@ -147,7 +166,7 @@ public RolloutInner withArtifactSourceId(String artifactSourceId) {
* @return the targetServiceTopologyId value.
*/
public String targetServiceTopologyId() {
- return this.targetServiceTopologyId;
+ return this.innerProperties() == null ? null : this.innerProperties().targetServiceTopologyId();
}
/**
@@ -158,7 +177,10 @@ public String targetServiceTopologyId() {
* @return the RolloutInner object itself.
*/
public RolloutInner withTargetServiceTopologyId(String targetServiceTopologyId) {
- this.targetServiceTopologyId = targetServiceTopologyId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RolloutProperties();
+ }
+ this.innerProperties().withTargetServiceTopologyId(targetServiceTopologyId);
return this;
}
@@ -168,7 +190,7 @@ public RolloutInner withTargetServiceTopologyId(String targetServiceTopologyId)
* @return the stepGroups value.
*/
public List stepGroups() {
- return this.stepGroups;
+ return this.innerProperties() == null ? null : this.innerProperties().stepGroups();
}
/**
@@ -178,58 +200,10 @@ public List stepGroups() {
* @return the RolloutInner object itself.
*/
public RolloutInner withStepGroups(List stepGroups) {
- this.stepGroups = stepGroups;
- return this;
- }
-
- /**
- * Get the status property: The current status of the rollout.
- *
- * @return the status value.
- */
- public String status() {
- return this.status;
- }
-
- /**
- * Get the totalRetryAttempts property: The cardinal count of total number of retries performed on the rollout at a
- * given time.
- *
- * @return the totalRetryAttempts value.
- */
- public Integer totalRetryAttempts() {
- return this.totalRetryAttempts;
- }
-
- /**
- * Get the operationInfo property: Operational information of the rollout.
- *
- * @return the operationInfo value.
- */
- public RolloutOperationInfo operationInfo() {
- return this.operationInfo;
- }
-
- /**
- * Get the services property: The detailed information on the services being deployed.
- *
- * @return the services value.
- */
- public List services() {
- return this.services;
- }
-
- /** {@inheritDoc} */
- @Override
- public RolloutInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public RolloutInner withTags(Map tags) {
- super.withTags(tags);
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RolloutProperties();
+ }
+ this.innerProperties().withStepGroups(stepGroups);
return this;
}
@@ -242,14 +216,8 @@ public void validate() {
if (identity() != null) {
identity().validate();
}
- if (stepGroups() != null) {
- stepGroups().forEach(e -> e.validate());
- }
- if (operationInfo() != null) {
- operationInfo().validate();
- }
- if (services() != null) {
- services().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/RolloutProperties.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutProperties.java
similarity index 91%
rename from sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/RolloutProperties.java
rename to sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutProperties.java
index b93f35bd0be1..4224a4de6b30 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/RolloutProperties.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutProperties.java
@@ -2,16 +2,19 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.deploymentmanager.models;
+package com.azure.resourcemanager.deploymentmanager.fluent.models;
-import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.deploymentmanager.models.RolloutOperationInfo;
+import com.azure.resourcemanager.deploymentmanager.models.Service;
+import com.azure.resourcemanager.deploymentmanager.models.StepGroup;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The properties that define a rollout. */
-@Immutable
+@Fluent
public final class RolloutProperties extends RolloutRequestProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(RolloutProperties.class);
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutRequestInner.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutRequestInner.java
index 528f39e1dbe6..8cfa406addb1 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutRequestInner.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutRequestInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.deploymentmanager.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.deploymentmanager.models.Identity;
@@ -16,9 +15,8 @@
import java.util.Map;
/** Defines the PUT rollout request body. */
-@JsonFlatten
@Fluent
-public class RolloutRequestInner extends Resource {
+public final class RolloutRequestInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(RolloutRequestInner.class);
/*
@@ -28,30 +26,10 @@ public class RolloutRequestInner extends Resource {
private Identity identity;
/*
- * The version of the build being deployed.
+ * Defines the properties that make up a rollout request.
*/
- @JsonProperty(value = "properties.buildVersion", required = true)
- private String buildVersion;
-
- /*
- * The reference to the artifact source resource Id where the payload is
- * located.
- */
- @JsonProperty(value = "properties.artifactSourceId")
- private String artifactSourceId;
-
- /*
- * The resource Id of the service topology from which service units are
- * being referenced in step groups to be deployed.
- */
- @JsonProperty(value = "properties.targetServiceTopologyId", required = true)
- private String targetServiceTopologyId;
-
- /*
- * The list of step groups that define the orchestration.
- */
- @JsonProperty(value = "properties.stepGroups", required = true)
- private List stepGroups;
+ @JsonProperty(value = "properties", required = true)
+ private RolloutRequestProperties innerProperties = new RolloutRequestProperties();
/**
* Get the identity property: Identity for the resource.
@@ -73,13 +51,36 @@ public RolloutRequestInner withIdentity(Identity identity) {
return this;
}
+ /**
+ * Get the innerProperties property: Defines the properties that make up a rollout request.
+ *
+ * @return the innerProperties value.
+ */
+ private RolloutRequestProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RolloutRequestInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RolloutRequestInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
/**
* Get the buildVersion property: The version of the build being deployed.
*
* @return the buildVersion value.
*/
public String buildVersion() {
- return this.buildVersion;
+ return this.innerProperties() == null ? null : this.innerProperties().buildVersion();
}
/**
@@ -89,7 +90,10 @@ public String buildVersion() {
* @return the RolloutRequestInner object itself.
*/
public RolloutRequestInner withBuildVersion(String buildVersion) {
- this.buildVersion = buildVersion;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RolloutRequestProperties();
+ }
+ this.innerProperties().withBuildVersion(buildVersion);
return this;
}
@@ -99,7 +103,7 @@ public RolloutRequestInner withBuildVersion(String buildVersion) {
* @return the artifactSourceId value.
*/
public String artifactSourceId() {
- return this.artifactSourceId;
+ return this.innerProperties() == null ? null : this.innerProperties().artifactSourceId();
}
/**
@@ -109,7 +113,10 @@ public String artifactSourceId() {
* @return the RolloutRequestInner object itself.
*/
public RolloutRequestInner withArtifactSourceId(String artifactSourceId) {
- this.artifactSourceId = artifactSourceId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RolloutRequestProperties();
+ }
+ this.innerProperties().withArtifactSourceId(artifactSourceId);
return this;
}
@@ -120,7 +127,7 @@ public RolloutRequestInner withArtifactSourceId(String artifactSourceId) {
* @return the targetServiceTopologyId value.
*/
public String targetServiceTopologyId() {
- return this.targetServiceTopologyId;
+ return this.innerProperties() == null ? null : this.innerProperties().targetServiceTopologyId();
}
/**
@@ -131,7 +138,10 @@ public String targetServiceTopologyId() {
* @return the RolloutRequestInner object itself.
*/
public RolloutRequestInner withTargetServiceTopologyId(String targetServiceTopologyId) {
- this.targetServiceTopologyId = targetServiceTopologyId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RolloutRequestProperties();
+ }
+ this.innerProperties().withTargetServiceTopologyId(targetServiceTopologyId);
return this;
}
@@ -141,7 +151,7 @@ public RolloutRequestInner withTargetServiceTopologyId(String targetServiceTopol
* @return the stepGroups value.
*/
public List stepGroups() {
- return this.stepGroups;
+ return this.innerProperties() == null ? null : this.innerProperties().stepGroups();
}
/**
@@ -151,21 +161,10 @@ public List stepGroups() {
* @return the RolloutRequestInner object itself.
*/
public RolloutRequestInner withStepGroups(List stepGroups) {
- this.stepGroups = stepGroups;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public RolloutRequestInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public RolloutRequestInner withTags(Map tags) {
- super.withTags(tags);
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RolloutRequestProperties();
+ }
+ this.innerProperties().withStepGroups(stepGroups);
return this;
}
@@ -182,24 +181,13 @@ public void validate() {
} else {
identity().validate();
}
- if (buildVersion() == null) {
+ if (innerProperties() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
- "Missing required property buildVersion in model RolloutRequestInner"));
- }
- if (targetServiceTopologyId() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- "Missing required property targetServiceTopologyId in model RolloutRequestInner"));
- }
- if (stepGroups() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException("Missing required property stepGroups in model RolloutRequestInner"));
+ "Missing required property innerProperties in model RolloutRequestInner"));
} else {
- stepGroups().forEach(e -> e.validate());
+ innerProperties().validate();
}
}
}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/RolloutRequestProperties.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutRequestProperties.java
similarity index 97%
rename from sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/RolloutRequestProperties.java
rename to sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutRequestProperties.java
index 439bcc519eb9..495ea65877ae 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/RolloutRequestProperties.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RolloutRequestProperties.java
@@ -2,10 +2,11 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.deploymentmanager.models;
+package com.azure.resourcemanager.deploymentmanager.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.deploymentmanager.models.StepGroup;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/SasProperties.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/SasProperties.java
new file mode 100644
index 000000000000..67b13fefd117
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/SasProperties.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties that define SAS authentication. */
+@Fluent
+public final class SasProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SasProperties.class);
+
+ /*
+ * The SAS URI to the Azure Storage blob container. Any offset from the
+ * root of the container to where the artifacts are located can be defined
+ * in the artifactRoot.
+ */
+ @JsonProperty(value = "sasUri", required = true)
+ private String sasUri;
+
+ /**
+ * Get the sasUri property: The SAS URI to the Azure Storage blob container. Any offset from the root of the
+ * container to where the artifacts are located can be defined in the artifactRoot.
+ *
+ * @return the sasUri value.
+ */
+ public String sasUri() {
+ return this.sasUri;
+ }
+
+ /**
+ * Set the sasUri property: The SAS URI to the Azure Storage blob container. Any offset from the root of the
+ * container to where the artifacts are located can be defined in the artifactRoot.
+ *
+ * @param sasUri the sasUri value to set.
+ * @return the SasProperties object itself.
+ */
+ public SasProperties withSasUri(String sasUri) {
+ this.sasUri = sasUri;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sasUri() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property sasUri in model SasProperties"));
+ }
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceResourceInner.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceResourceInner.java
index e79ad40f9682..5a90ba8cd0c1 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceResourceInner.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceResourceInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.deploymentmanager.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -13,67 +12,23 @@
import java.util.Map;
/** The resource representation of a service in a service topology. */
-@JsonFlatten
@Fluent
-public class ServiceResourceInner extends Resource {
+public final class ServiceResourceInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceResourceInner.class);
/*
- * The Azure location to which the resources in the service belong to or
- * should be deployed to.
+ * The properties that define a service in a service topology.
*/
- @JsonProperty(value = "properties.targetLocation", required = true)
- private String targetLocation;
-
- /*
- * The subscription to which the resources in the service belong to or
- * should be deployed to.
- */
- @JsonProperty(value = "properties.targetSubscriptionId", required = true)
- private String targetSubscriptionId;
-
- /**
- * Get the targetLocation property: The Azure location to which the resources in the service belong to or should be
- * deployed to.
- *
- * @return the targetLocation value.
- */
- public String targetLocation() {
- return this.targetLocation;
- }
-
- /**
- * Set the targetLocation property: The Azure location to which the resources in the service belong to or should be
- * deployed to.
- *
- * @param targetLocation the targetLocation value to set.
- * @return the ServiceResourceInner object itself.
- */
- public ServiceResourceInner withTargetLocation(String targetLocation) {
- this.targetLocation = targetLocation;
- return this;
- }
-
- /**
- * Get the targetSubscriptionId property: The subscription to which the resources in the service belong to or should
- * be deployed to.
- *
- * @return the targetSubscriptionId value.
- */
- public String targetSubscriptionId() {
- return this.targetSubscriptionId;
- }
+ @JsonProperty(value = "properties", required = true)
+ private ServiceResourceProperties innerProperties = new ServiceResourceProperties();
/**
- * Set the targetSubscriptionId property: The subscription to which the resources in the service belong to or should
- * be deployed to.
+ * Get the innerProperties property: The properties that define a service in a service topology.
*
- * @param targetSubscriptionId the targetSubscriptionId value to set.
- * @return the ServiceResourceInner object itself.
+ * @return the innerProperties value.
*/
- public ServiceResourceInner withTargetSubscriptionId(String targetSubscriptionId) {
- this.targetSubscriptionId = targetSubscriptionId;
- return this;
+ private ServiceResourceProperties innerProperties() {
+ return this.innerProperties;
}
/** {@inheritDoc} */
@@ -96,17 +51,13 @@ public ServiceResourceInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (targetLocation() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- "Missing required property targetLocation in model ServiceResourceInner"));
- }
- if (targetSubscriptionId() == null) {
+ if (innerProperties() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
- "Missing required property targetSubscriptionId in model ServiceResourceInner"));
+ "Missing required property innerProperties in model ServiceResourceInner"));
+ } else {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceResourceProperties.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceResourceProperties.java
similarity index 85%
rename from sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceResourceProperties.java
rename to sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceResourceProperties.java
index c846a0ecd9af..daa3da1dbde2 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceResourceProperties.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceResourceProperties.java
@@ -2,14 +2,15 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.deploymentmanager.models;
+package com.azure.resourcemanager.deploymentmanager.fluent.models;
-import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.deploymentmanager.models.ServiceProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
/** The properties that define a service in a service topology. */
-@Immutable
+@Fluent
public final class ServiceResourceProperties extends ServiceProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceResourceProperties.class);
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceTopologyResourceInner.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceTopologyResourceInner.java
index c496a72a722e..d20bae6a02dc 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceTopologyResourceInner.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceTopologyResourceInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.deploymentmanager.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -13,38 +12,23 @@
import java.util.Map;
/** The resource representation of a service topology. */
-@JsonFlatten
@Fluent
-public class ServiceTopologyResourceInner extends Resource {
+public final class ServiceTopologyResourceInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceTopologyResourceInner.class);
/*
- * The resource Id of the artifact source that contains the artifacts that
- * can be referenced in the service units.
+ * The properties that define the service topology.
*/
- @JsonProperty(value = "properties.artifactSourceId")
- private String artifactSourceId;
+ @JsonProperty(value = "properties", required = true)
+ private ServiceTopologyResourceProperties innerProperties = new ServiceTopologyResourceProperties();
/**
- * Get the artifactSourceId property: The resource Id of the artifact source that contains the artifacts that can be
- * referenced in the service units.
+ * Get the innerProperties property: The properties that define the service topology.
*
- * @return the artifactSourceId value.
+ * @return the innerProperties value.
*/
- public String artifactSourceId() {
- return this.artifactSourceId;
- }
-
- /**
- * Set the artifactSourceId property: The resource Id of the artifact source that contains the artifacts that can be
- * referenced in the service units.
- *
- * @param artifactSourceId the artifactSourceId value to set.
- * @return the ServiceTopologyResourceInner object itself.
- */
- public ServiceTopologyResourceInner withArtifactSourceId(String artifactSourceId) {
- this.artifactSourceId = artifactSourceId;
- return this;
+ private ServiceTopologyResourceProperties innerProperties() {
+ return this.innerProperties;
}
/** {@inheritDoc} */
@@ -67,5 +51,13 @@ public ServiceTopologyResourceInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model ServiceTopologyResourceInner"));
+ } else {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceTopologyResourceProperties.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceTopologyResourceProperties.java
similarity index 82%
rename from sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceTopologyResourceProperties.java
rename to sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceTopologyResourceProperties.java
index e2874a346f75..d6bbd0a6b561 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceTopologyResourceProperties.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceTopologyResourceProperties.java
@@ -2,14 +2,15 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.deploymentmanager.models;
+package com.azure.resourcemanager.deploymentmanager.fluent.models;
-import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.deploymentmanager.models.ServiceTopologyProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
/** The properties that define the service topology. */
-@Immutable
+@Fluent
public final class ServiceTopologyResourceProperties extends ServiceTopologyProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceTopologyResourceProperties.class);
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceUnitResourceInner.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceUnitResourceInner.java
index 2472e2289699..1fb26b1da830 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceUnitResourceInner.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceUnitResourceInner.java
@@ -5,100 +5,30 @@
package com.azure.resourcemanager.deploymentmanager.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.deploymentmanager.models.DeploymentMode;
-import com.azure.resourcemanager.deploymentmanager.models.ServiceUnitArtifacts;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** Represents the response of a service unit resource. */
-@JsonFlatten
@Fluent
-public class ServiceUnitResourceInner extends Resource {
+public final class ServiceUnitResourceInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceUnitResourceInner.class);
/*
- * The Azure Resource Group to which the resources in the service unit
- * belong to or should be deployed to.
+ * The properties that define the service unit.
*/
- @JsonProperty(value = "properties.targetResourceGroup", required = true)
- private String targetResourceGroup;
-
- /*
- * Describes the type of ARM deployment to be performed on the resource.
- */
- @JsonProperty(value = "properties.deploymentMode", required = true)
- private DeploymentMode deploymentMode;
-
- /*
- * The artifacts for the service unit.
- */
- @JsonProperty(value = "properties.artifacts")
- private ServiceUnitArtifacts artifacts;
-
- /**
- * Get the targetResourceGroup property: The Azure Resource Group to which the resources in the service unit belong
- * to or should be deployed to.
- *
- * @return the targetResourceGroup value.
- */
- public String targetResourceGroup() {
- return this.targetResourceGroup;
- }
-
- /**
- * Set the targetResourceGroup property: The Azure Resource Group to which the resources in the service unit belong
- * to or should be deployed to.
- *
- * @param targetResourceGroup the targetResourceGroup value to set.
- * @return the ServiceUnitResourceInner object itself.
- */
- public ServiceUnitResourceInner withTargetResourceGroup(String targetResourceGroup) {
- this.targetResourceGroup = targetResourceGroup;
- return this;
- }
+ @JsonProperty(value = "properties", required = true)
+ private ServiceUnitResourceProperties innerProperties = new ServiceUnitResourceProperties();
/**
- * Get the deploymentMode property: Describes the type of ARM deployment to be performed on the resource.
+ * Get the innerProperties property: The properties that define the service unit.
*
- * @return the deploymentMode value.
+ * @return the innerProperties value.
*/
- public DeploymentMode deploymentMode() {
- return this.deploymentMode;
- }
-
- /**
- * Set the deploymentMode property: Describes the type of ARM deployment to be performed on the resource.
- *
- * @param deploymentMode the deploymentMode value to set.
- * @return the ServiceUnitResourceInner object itself.
- */
- public ServiceUnitResourceInner withDeploymentMode(DeploymentMode deploymentMode) {
- this.deploymentMode = deploymentMode;
- return this;
- }
-
- /**
- * Get the artifacts property: The artifacts for the service unit.
- *
- * @return the artifacts value.
- */
- public ServiceUnitArtifacts artifacts() {
- return this.artifacts;
- }
-
- /**
- * Set the artifacts property: The artifacts for the service unit.
- *
- * @param artifacts the artifacts value to set.
- * @return the ServiceUnitResourceInner object itself.
- */
- public ServiceUnitResourceInner withArtifacts(ServiceUnitArtifacts artifacts) {
- this.artifacts = artifacts;
- return this;
+ private ServiceUnitResourceProperties innerProperties() {
+ return this.innerProperties;
}
/** {@inheritDoc} */
@@ -121,20 +51,13 @@ public ServiceUnitResourceInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (targetResourceGroup() == null) {
+ if (innerProperties() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
- "Missing required property targetResourceGroup in model ServiceUnitResourceInner"));
- }
- if (deploymentMode() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- "Missing required property deploymentMode in model ServiceUnitResourceInner"));
- }
- if (artifacts() != null) {
- artifacts().validate();
+ "Missing required property innerProperties in model ServiceUnitResourceInner"));
+ } else {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceUnitResourceProperties.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceUnitResourceProperties.java
similarity index 79%
rename from sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceUnitResourceProperties.java
rename to sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceUnitResourceProperties.java
index a0635d1451d6..51fd2b1b04b9 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceUnitResourceProperties.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/ServiceUnitResourceProperties.java
@@ -2,14 +2,17 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.deploymentmanager.models;
+package com.azure.resourcemanager.deploymentmanager.fluent.models;
-import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.deploymentmanager.models.DeploymentMode;
+import com.azure.resourcemanager.deploymentmanager.models.ServiceUnitArtifacts;
+import com.azure.resourcemanager.deploymentmanager.models.ServiceUnitProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
/** The properties that define the service unit. */
-@Immutable
+@Fluent
public final class ServiceUnitResourceProperties extends ServiceUnitProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceUnitResourceProperties.class);
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/package-info.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/package-info.java
index 4247ac6f220e..7cc5535347d8 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/package-info.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/package-info.java
@@ -5,6 +5,6 @@
/**
* Package containing the inner data models for AzureDeploymentManager. REST APIs for orchestrating deployments using
* the Azure Deployment Manager (ADM). See
- * https://docs.microsoft.com/azure/azure-resource-manager/deployment-manager-overview for more information.
+ * https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview for more information.
*/
package com.azure.resourcemanager.deploymentmanager.fluent.models;
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/package-info.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/package-info.java
index b773ef427af3..9230ccea9da4 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/package-info.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/package-info.java
@@ -5,6 +5,6 @@
/**
* Package containing the service clients for AzureDeploymentManager. REST APIs for orchestrating deployments using the
* Azure Deployment Manager (ADM). See
- * https://docs.microsoft.com/azure/azure-resource-manager/deployment-manager-overview for more information.
+ * https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview for more information.
*/
package com.azure.resourcemanager.deploymentmanager.fluent;
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ArtifactSourceImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ArtifactSourceImpl.java
index c3daf0df5962..2fcdadd4944f 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ArtifactSourceImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ArtifactSourceImpl.java
@@ -8,7 +8,6 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.deploymentmanager.fluent.models.ArtifactSourceInner;
import com.azure.resourcemanager.deploymentmanager.models.ArtifactSource;
-import com.azure.resourcemanager.deploymentmanager.models.Authentication;
import java.util.Collections;
import java.util.Map;
@@ -42,18 +41,6 @@ public Map tags() {
}
}
- public String sourceType() {
- return this.innerModel().sourceType();
- }
-
- public String artifactRoot() {
- return this.innerModel().artifactRoot();
- }
-
- public Authentication authentication() {
- return this.innerModel().authentication();
- }
-
public Region region() {
return Region.fromName(this.regionName());
}
@@ -171,19 +158,4 @@ public ArtifactSourceImpl withTags(Map tags) {
this.innerModel().withTags(tags);
return this;
}
-
- public ArtifactSourceImpl withSourceType(String sourceType) {
- this.innerModel().withSourceType(sourceType);
- return this;
- }
-
- public ArtifactSourceImpl withArtifactRoot(String artifactRoot) {
- this.innerModel().withArtifactRoot(artifactRoot);
- return this;
- }
-
- public ArtifactSourceImpl withAuthentication(Authentication authentication) {
- this.innerModel().withAuthentication(authentication);
- return this;
- }
}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ArtifactSourcesImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ArtifactSourcesImpl.java
index 3263cb1ee83a..0244c3df7155 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ArtifactSourcesImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ArtifactSourcesImpl.java
@@ -151,7 +151,7 @@ public void deleteById(String id) {
String
.format("The resource ID '%s' is not valid. Missing path segment 'artifactSources'.", id)));
}
- this.deleteWithResponse(resourceGroupName, artifactSourceName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroupName, artifactSourceName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/RolloutImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/RolloutImpl.java
index cf50254501a4..29c6150e0d82 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/RolloutImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/RolloutImpl.java
@@ -54,20 +54,20 @@ public Identity identity() {
return this.innerModel().identity();
}
- public String buildVersion() {
- return this.innerModel().buildVersion();
+ public String status() {
+ return this.innerModel().status();
}
- public String artifactSourceId() {
- return this.innerModel().artifactSourceId();
+ public Integer totalRetryAttempts() {
+ return this.innerModel().totalRetryAttempts();
}
- public String targetServiceTopologyId() {
- return this.innerModel().targetServiceTopologyId();
+ public RolloutOperationInfo operationInfo() {
+ return this.innerModel().operationInfo();
}
- public List stepGroups() {
- List inner = this.innerModel().stepGroups();
+ public List services() {
+ List inner = this.innerModel().services();
if (inner != null) {
return Collections.unmodifiableList(inner);
} else {
@@ -75,20 +75,20 @@ public List stepGroups() {
}
}
- public String status() {
- return this.innerModel().status();
+ public String buildVersion() {
+ return this.innerModel().buildVersion();
}
- public Integer totalRetryAttempts() {
- return this.innerModel().totalRetryAttempts();
+ public String artifactSourceId() {
+ return this.innerModel().artifactSourceId();
}
- public RolloutOperationInfo operationInfo() {
- return this.innerModel().operationInfo();
+ public String targetServiceTopologyId() {
+ return this.innerModel().targetServiceTopologyId();
}
- public List services() {
- List inner = this.innerModel().services();
+ public List stepGroups() {
+ List inner = this.innerModel().stepGroups();
if (inner != null) {
return Collections.unmodifiableList(inner);
} else {
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/RolloutsClientImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/RolloutsClientImpl.java
index d634ec045b7b..500c6832b887 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/RolloutsClientImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/RolloutsClientImpl.java
@@ -275,7 +275,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return defines the PUT rollout request body.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, RolloutRequestInner> beginCreateOrUpdateAsync(
String resourceGroupName, String rolloutName, RolloutRequestInner rolloutRequest) {
Mono>> mono =
@@ -303,7 +303,7 @@ private PollerFlux, RolloutRequestInner> beginCr
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return defines the PUT rollout request body.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, RolloutRequestInner> beginCreateOrUpdateAsync(
String resourceGroupName, String rolloutName, RolloutRequestInner rolloutRequest, Context context) {
context = this.client.mergeContext(context);
@@ -327,7 +327,7 @@ private PollerFlux, RolloutRequestInner> beginCr
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return defines the PUT rollout request body.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, RolloutRequestInner> beginCreateOrUpdate(
String resourceGroupName, String rolloutName, RolloutRequestInner rolloutRequest) {
return beginCreateOrUpdateAsync(resourceGroupName, rolloutName, rolloutRequest).getSyncPoller();
@@ -346,7 +346,7 @@ public SyncPoller, RolloutRequestInner> beginCre
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return defines the PUT rollout request body.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, RolloutRequestInner> beginCreateOrUpdate(
String resourceGroupName, String rolloutName, RolloutRequestInner rolloutRequest, Context context) {
return beginCreateOrUpdateAsync(resourceGroupName, rolloutName, rolloutRequest, context).getSyncPoller();
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/RolloutsImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/RolloutsImpl.java
index f9a3262c68c8..10ddaf2a15d3 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/RolloutsImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/RolloutsImpl.java
@@ -152,7 +152,7 @@ public void deleteById(String id) {
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'rollouts'.", id)));
}
- this.deleteWithResponse(resourceGroupName, rolloutName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroupName, rolloutName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceResourceImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceResourceImpl.java
index 4f70defa2700..0f8e291cff47 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceResourceImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceResourceImpl.java
@@ -41,14 +41,6 @@ public Map tags() {
}
}
- public String targetLocation() {
- return this.innerModel().targetLocation();
- }
-
- public String targetSubscriptionId() {
- return this.innerModel().targetSubscriptionId();
- }
-
public Region region() {
return Region.fromName(this.regionName());
}
@@ -171,16 +163,6 @@ public ServiceResourceImpl withRegion(String location) {
return this;
}
- public ServiceResourceImpl withTargetLocation(String targetLocation) {
- this.innerModel().withTargetLocation(targetLocation);
- return this;
- }
-
- public ServiceResourceImpl withTargetSubscriptionId(String targetSubscriptionId) {
- this.innerModel().withTargetSubscriptionId(targetSubscriptionId);
- return this;
- }
-
public ServiceResourceImpl withTags(Map tags) {
this.innerModel().withTags(tags);
return this;
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceTopologiesImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceTopologiesImpl.java
index 542858647aa0..81d33568976d 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceTopologiesImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceTopologiesImpl.java
@@ -156,7 +156,7 @@ public void deleteById(String id) {
.format(
"The resource ID '%s' is not valid. Missing path segment 'serviceTopologies'.", id)));
}
- this.deleteWithResponse(resourceGroupName, serviceTopologyName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroupName, serviceTopologyName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceTopologyResourceImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceTopologyResourceImpl.java
index bd6965b1127a..712695d6e63f 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceTopologyResourceImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceTopologyResourceImpl.java
@@ -42,10 +42,6 @@ public Map tags() {
}
}
- public String artifactSourceId() {
- return this.innerModel().artifactSourceId();
- }
-
public Region region() {
return Region.fromName(this.regionName());
}
@@ -165,9 +161,4 @@ public ServiceTopologyResourceImpl withTags(Map tags) {
this.innerModel().withTags(tags);
return this;
}
-
- public ServiceTopologyResourceImpl withArtifactSourceId(String artifactSourceId) {
- this.innerModel().withArtifactSourceId(artifactSourceId);
- return this;
- }
}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceUnitResourceImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceUnitResourceImpl.java
index 86d869e41dda..be67ef9082b8 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceUnitResourceImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceUnitResourceImpl.java
@@ -7,8 +7,6 @@
import com.azure.core.management.Region;
import com.azure.core.util.Context;
import com.azure.resourcemanager.deploymentmanager.fluent.models.ServiceUnitResourceInner;
-import com.azure.resourcemanager.deploymentmanager.models.DeploymentMode;
-import com.azure.resourcemanager.deploymentmanager.models.ServiceUnitArtifacts;
import com.azure.resourcemanager.deploymentmanager.models.ServiceUnitResource;
import java.util.Collections;
import java.util.Map;
@@ -44,18 +42,6 @@ public Map tags() {
}
}
- public String targetResourceGroup() {
- return this.innerModel().targetResourceGroup();
- }
-
- public DeploymentMode deploymentMode() {
- return this.innerModel().deploymentMode();
- }
-
- public ServiceUnitArtifacts artifacts() {
- return this.innerModel().artifacts();
- }
-
public Region region() {
return Region.fromName(this.regionName());
}
@@ -189,23 +175,8 @@ public ServiceUnitResourceImpl withRegion(String location) {
return this;
}
- public ServiceUnitResourceImpl withTargetResourceGroup(String targetResourceGroup) {
- this.innerModel().withTargetResourceGroup(targetResourceGroup);
- return this;
- }
-
- public ServiceUnitResourceImpl withDeploymentMode(DeploymentMode deploymentMode) {
- this.innerModel().withDeploymentMode(deploymentMode);
- return this;
- }
-
public ServiceUnitResourceImpl withTags(Map tags) {
this.innerModel().withTags(tags);
return this;
}
-
- public ServiceUnitResourceImpl withArtifacts(ServiceUnitArtifacts artifacts) {
- this.innerModel().withArtifacts(artifacts);
- return this;
- }
}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceUnitsClientImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceUnitsClientImpl.java
index bec24b5cf181..186cd57ba748 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceUnitsClientImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceUnitsClientImpl.java
@@ -291,7 +291,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents the response of a service unit resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, ServiceUnitResourceInner> beginCreateOrUpdateAsync(
String resourceGroupName,
String serviceTopologyName,
@@ -326,7 +326,7 @@ private PollerFlux, ServiceUnitResourceInne
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents the response of a service unit resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, ServiceUnitResourceInner> beginCreateOrUpdateAsync(
String resourceGroupName,
String serviceTopologyName,
@@ -362,7 +362,7 @@ private PollerFlux, ServiceUnitResourceInne
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents the response of a service unit resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, ServiceUnitResourceInner> beginCreateOrUpdate(
String resourceGroupName,
String serviceTopologyName,
@@ -389,7 +389,7 @@ public SyncPoller, ServiceUnitResourceInner
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents the response of a service unit resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, ServiceUnitResourceInner> beginCreateOrUpdate(
String resourceGroupName,
String serviceTopologyName,
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceUnitsImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceUnitsImpl.java
index f7edf2376e5b..c17b81fed606 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceUnitsImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceUnitsImpl.java
@@ -216,9 +216,7 @@ public void deleteById(String id) {
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'serviceUnits'.", id)));
}
- this
- .deleteWithResponse(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, Context.NONE)
- .getValue();
+ this.deleteWithResponse(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServicesImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServicesImpl.java
index c4881bf7986b..ed508361cc45 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServicesImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServicesImpl.java
@@ -177,7 +177,7 @@ public void deleteById(String id) {
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id)));
}
- this.deleteWithResponse(resourceGroupName, serviceTopologyName, serviceName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroupName, serviceTopologyName, serviceName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/StepsImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/StepsImpl.java
index 3320b4c5a951..fec9b4fdbc03 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/StepsImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/StepsImpl.java
@@ -147,7 +147,7 @@ public void deleteById(String id) {
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'steps'.", id)));
}
- this.deleteWithResponse(resourceGroupName, stepName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroupName, stepName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/package-info.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/package-info.java
index fcecd3f9c3fb..a3e88bd1fcbe 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/package-info.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/package-info.java
@@ -5,6 +5,6 @@
/**
* Package containing the implementations for AzureDeploymentManager. REST APIs for orchestrating deployments using the
* Azure Deployment Manager (ADM). See
- * https://docs.microsoft.com/azure/azure-resource-manager/deployment-manager-overview for more information.
+ * https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview for more information.
*/
package com.azure.resourcemanager.deploymentmanager.implementation;
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ArtifactSource.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ArtifactSource.java
index 614410889234..785c754648ba 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ArtifactSource.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ArtifactSource.java
@@ -46,31 +46,6 @@ public interface ArtifactSource {
*/
Map tags();
- /**
- * Gets the sourceType property: The type of artifact source used.
- *
- * @return the sourceType value.
- */
- String sourceType();
-
- /**
- * Gets the artifactRoot property: The path from the location that the 'authentication' property [say, a SAS URI to
- * the blob container] refers to, to the location of the artifacts. This can be used to differentiate different
- * versions of the artifacts. Or, different types of artifacts like binaries or templates. The location referenced
- * by the authentication property concatenated with this optional artifactRoot path forms the artifact source
- * location where the artifacts are expected to be found.
- *
- * @return the artifactRoot value.
- */
- String artifactRoot();
-
- /**
- * Gets the authentication property: The authentication method to use to access the artifact source.
- *
- * @return the authentication value.
- */
- Authentication authentication();
-
/**
* Gets the region of the resource.
*
@@ -136,11 +111,7 @@ interface WithResourceGroup {
* The stage of the ArtifactSource 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.WithTags,
- DefinitionStages.WithSourceType,
- DefinitionStages.WithArtifactRoot,
- DefinitionStages.WithAuthentication {
+ interface WithCreate extends DefinitionStages.WithTags {
/**
* Executes the create request.
*
@@ -166,44 +137,6 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
- /** The stage of the ArtifactSource definition allowing to specify sourceType. */
- interface WithSourceType {
- /**
- * Specifies the sourceType property: The type of artifact source used..
- *
- * @param sourceType The type of artifact source used.
- * @return the next definition stage.
- */
- WithCreate withSourceType(String sourceType);
- }
- /** The stage of the ArtifactSource definition allowing to specify artifactRoot. */
- interface WithArtifactRoot {
- /**
- * Specifies the artifactRoot property: The path from the location that the 'authentication' property [say,
- * a SAS URI to the blob container] refers to, to the location of the artifacts. This can be used to
- * differentiate different versions of the artifacts. Or, different types of artifacts like binaries or
- * templates. The location referenced by the authentication property concatenated with this optional
- * artifactRoot path forms the artifact source location where the artifacts are expected to be found..
- *
- * @param artifactRoot The path from the location that the 'authentication' property [say, a SAS URI to the
- * blob container] refers to, to the location of the artifacts. This can be used to differentiate
- * different versions of the artifacts. Or, different types of artifacts like binaries or templates. The
- * location referenced by the authentication property concatenated with this optional artifactRoot path
- * forms the artifact source location where the artifacts are expected to be found.
- * @return the next definition stage.
- */
- WithCreate withArtifactRoot(String artifactRoot);
- }
- /** The stage of the ArtifactSource definition allowing to specify authentication. */
- interface WithAuthentication {
- /**
- * Specifies the authentication property: The authentication method to use to access the artifact source..
- *
- * @param authentication The authentication method to use to access the artifact source.
- * @return the next definition stage.
- */
- WithCreate withAuthentication(Authentication authentication);
- }
}
/**
* Begins update for the ArtifactSource resource.
@@ -213,11 +146,7 @@ interface WithAuthentication {
ArtifactSource.Update update();
/** The template for ArtifactSource update. */
- interface Update
- extends UpdateStages.WithTags,
- UpdateStages.WithSourceType,
- UpdateStages.WithArtifactRoot,
- UpdateStages.WithAuthentication {
+ interface Update extends UpdateStages.WithTags {
/**
* Executes the update request.
*
@@ -245,44 +174,6 @@ interface WithTags {
*/
Update withTags(Map tags);
}
- /** The stage of the ArtifactSource update allowing to specify sourceType. */
- interface WithSourceType {
- /**
- * Specifies the sourceType property: The type of artifact source used..
- *
- * @param sourceType The type of artifact source used.
- * @return the next definition stage.
- */
- Update withSourceType(String sourceType);
- }
- /** The stage of the ArtifactSource update allowing to specify artifactRoot. */
- interface WithArtifactRoot {
- /**
- * Specifies the artifactRoot property: The path from the location that the 'authentication' property [say,
- * a SAS URI to the blob container] refers to, to the location of the artifacts. This can be used to
- * differentiate different versions of the artifacts. Or, different types of artifacts like binaries or
- * templates. The location referenced by the authentication property concatenated with this optional
- * artifactRoot path forms the artifact source location where the artifacts are expected to be found..
- *
- * @param artifactRoot The path from the location that the 'authentication' property [say, a SAS URI to the
- * blob container] refers to, to the location of the artifacts. This can be used to differentiate
- * different versions of the artifacts. Or, different types of artifacts like binaries or templates. The
- * location referenced by the authentication property concatenated with this optional artifactRoot path
- * forms the artifact source location where the artifacts are expected to be found.
- * @return the next definition stage.
- */
- Update withArtifactRoot(String artifactRoot);
- }
- /** The stage of the ArtifactSource update allowing to specify authentication. */
- interface WithAuthentication {
- /**
- * Specifies the authentication property: The authentication method to use to access the artifact source..
- *
- * @param authentication The authentication method to use to access the artifact source.
- * @return the next definition stage.
- */
- Update withAuthentication(Authentication authentication);
- }
}
/**
* Refreshes the resource to sync with Azure.
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/RestHealthCheckStepAttributes.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/RestHealthCheckStepAttributes.java
index 347c3b25ef2b..13627acba749 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/RestHealthCheckStepAttributes.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/RestHealthCheckStepAttributes.java
@@ -5,8 +5,8 @@
package com.azure.resourcemanager.deploymentmanager.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.deploymentmanager.fluent.models.RestParameters;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
@@ -16,35 +16,23 @@
/** Defines the REST health check step properties. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("REST")
-@JsonFlatten
@Fluent
-public class RestHealthCheckStepAttributes extends HealthCheckStepAttributes {
+public final class RestHealthCheckStepAttributes extends HealthCheckStepAttributes {
@JsonIgnore private final ClientLogger logger = new ClientLogger(RestHealthCheckStepAttributes.class);
/*
- * The list of checks that form the health check step.
+ * The REST health check parameters.
*/
- @JsonProperty(value = "properties.healthChecks")
- private List healthChecks;
+ @JsonProperty(value = "properties")
+ private RestParameters innerProperties;
/**
- * Get the healthChecks property: The list of checks that form the health check step.
- *
- * @return the healthChecks value.
- */
- public List healthChecks() {
- return this.healthChecks;
- }
-
- /**
- * Set the healthChecks property: The list of checks that form the health check step.
+ * Get the innerProperties property: The REST health check parameters.
*
- * @param healthChecks the healthChecks value to set.
- * @return the RestHealthCheckStepAttributes object itself.
+ * @return the innerProperties value.
*/
- public RestHealthCheckStepAttributes withHealthChecks(List healthChecks) {
- this.healthChecks = healthChecks;
- return this;
+ private RestParameters innerProperties() {
+ return this.innerProperties;
}
/** {@inheritDoc} */
@@ -68,6 +56,29 @@ public RestHealthCheckStepAttributes withHealthyStateDuration(String healthyStat
return this;
}
+ /**
+ * Get the healthChecks property: The list of checks that form the health check step.
+ *
+ * @return the healthChecks value.
+ */
+ public List healthChecks() {
+ return this.innerProperties() == null ? null : this.innerProperties().healthChecks();
+ }
+
+ /**
+ * Set the healthChecks property: The list of checks that form the health check step.
+ *
+ * @param healthChecks the healthChecks value to set.
+ * @return the RestHealthCheckStepAttributes object itself.
+ */
+ public RestHealthCheckStepAttributes withHealthChecks(List healthChecks) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RestParameters();
+ }
+ this.innerProperties().withHealthChecks(healthChecks);
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -76,8 +87,8 @@ public RestHealthCheckStepAttributes withHealthyStateDuration(String healthyStat
@Override
public void validate() {
super.validate();
- if (healthChecks() != null) {
- healthChecks().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/Rollout.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/Rollout.java
index e5de7943187b..79b07321a848 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/Rollout.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/Rollout.java
@@ -53,63 +53,63 @@ public interface Rollout {
Identity identity();
/**
- * Gets the buildVersion property: The version of the build being deployed.
+ * Gets the status property: The current status of the rollout.
*
- * @return the buildVersion value.
+ * @return the status value.
*/
- String buildVersion();
+ String status();
/**
- * Gets the artifactSourceId property: The reference to the artifact source resource Id where the payload is
- * located.
+ * Gets the totalRetryAttempts property: The cardinal count of total number of retries performed on the rollout at a
+ * given time.
*
- * @return the artifactSourceId value.
+ * @return the totalRetryAttempts value.
*/
- String artifactSourceId();
+ Integer totalRetryAttempts();
/**
- * Gets the targetServiceTopologyId property: The resource Id of the service topology from which service units are
- * being referenced in step groups to be deployed.
+ * Gets the operationInfo property: Operational information of the rollout.
*
- * @return the targetServiceTopologyId value.
+ * @return the operationInfo value.
*/
- String targetServiceTopologyId();
+ RolloutOperationInfo operationInfo();
/**
- * Gets the stepGroups property: The list of step groups that define the orchestration.
+ * Gets the services property: The detailed information on the services being deployed.
*
- * @return the stepGroups value.
+ * @return the services value.
*/
- List stepGroups();
+ List services();
/**
- * Gets the status property: The current status of the rollout.
+ * Gets the buildVersion property: The version of the build being deployed.
*
- * @return the status value.
+ * @return the buildVersion value.
*/
- String status();
+ String buildVersion();
/**
- * Gets the totalRetryAttempts property: The cardinal count of total number of retries performed on the rollout at a
- * given time.
+ * Gets the artifactSourceId property: The reference to the artifact source resource Id where the payload is
+ * located.
*
- * @return the totalRetryAttempts value.
+ * @return the artifactSourceId value.
*/
- Integer totalRetryAttempts();
+ String artifactSourceId();
/**
- * Gets the operationInfo property: Operational information of the rollout.
+ * Gets the targetServiceTopologyId property: The resource Id of the service topology from which service units are
+ * being referenced in step groups to be deployed.
*
- * @return the operationInfo value.
+ * @return the targetServiceTopologyId value.
*/
- RolloutOperationInfo operationInfo();
+ String targetServiceTopologyId();
/**
- * Gets the services property: The detailed information on the services being deployed.
+ * Gets the stepGroups property: The list of step groups that define the orchestration.
*
- * @return the services value.
+ * @return the stepGroups value.
*/
- List services();
+ List stepGroups();
/**
* Gets the inner com.azure.resourcemanager.deploymentmanager.fluent.models.RolloutInner object.
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/SasAuthentication.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/SasAuthentication.java
index ca5163f5a388..80de5a129301 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/SasAuthentication.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/SasAuthentication.java
@@ -5,8 +5,8 @@
package com.azure.resourcemanager.deploymentmanager.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.deploymentmanager.fluent.models.SasProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
@@ -15,18 +15,24 @@
/** Defines the properties to access the artifacts using an Azure Storage SAS URI. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("Sas")
-@JsonFlatten
@Fluent
-public class SasAuthentication extends Authentication {
+public final class SasAuthentication extends Authentication {
@JsonIgnore private final ClientLogger logger = new ClientLogger(SasAuthentication.class);
/*
- * The SAS URI to the Azure Storage blob container. Any offset from the
- * root of the container to where the artifacts are located can be defined
- * in the artifactRoot.
+ * The SAS properties
*/
- @JsonProperty(value = "properties.sasUri")
- private String sasUri;
+ @JsonProperty(value = "properties")
+ private SasProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: The SAS properties.
+ *
+ * @return the innerProperties value.
+ */
+ private SasProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the sasUri property: The SAS URI to the Azure Storage blob container. Any offset from the root of the
@@ -35,7 +41,7 @@ public class SasAuthentication extends Authentication {
* @return the sasUri value.
*/
public String sasUri() {
- return this.sasUri;
+ return this.innerProperties() == null ? null : this.innerProperties().sasUri();
}
/**
@@ -46,7 +52,10 @@ public String sasUri() {
* @return the SasAuthentication object itself.
*/
public SasAuthentication withSasUri(String sasUri) {
- this.sasUri = sasUri;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SasProperties();
+ }
+ this.innerProperties().withSasUri(sasUri);
return this;
}
@@ -58,5 +67,8 @@ public SasAuthentication withSasUri(String sasUri) {
@Override
public void validate() {
super.validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceResource.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceResource.java
index 1f16428ff04a..b363eab344df 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceResource.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceResource.java
@@ -46,22 +46,6 @@ public interface ServiceResource {
*/
Map tags();
- /**
- * Gets the targetLocation property: The Azure location to which the resources in the service belong to or should be
- * deployed to.
- *
- * @return the targetLocation value.
- */
- String targetLocation();
-
- /**
- * Gets the targetSubscriptionId property: The subscription to which the resources in the service belong to or
- * should be deployed to.
- *
- * @return the targetSubscriptionId value.
- */
- String targetSubscriptionId();
-
/**
* Gets the region of the resource.
*
@@ -88,8 +72,6 @@ interface Definition
extends DefinitionStages.Blank,
DefinitionStages.WithLocation,
DefinitionStages.WithParentResource,
- DefinitionStages.WithTargetLocation,
- DefinitionStages.WithTargetSubscriptionId,
DefinitionStages.WithCreate {
}
/** The ServiceResource definition stages. */
@@ -124,31 +106,7 @@ interface WithParentResource {
* @param serviceTopologyName The name of the service topology .
* @return the next definition stage.
*/
- WithTargetLocation withExistingServiceTopology(String resourceGroupName, String serviceTopologyName);
- }
- /** The stage of the ServiceResource definition allowing to specify targetLocation. */
- interface WithTargetLocation {
- /**
- * Specifies the targetLocation property: The Azure location to which the resources in the service belong to
- * or should be deployed to..
- *
- * @param targetLocation The Azure location to which the resources in the service belong to or should be
- * deployed to.
- * @return the next definition stage.
- */
- WithTargetSubscriptionId withTargetLocation(String targetLocation);
- }
- /** The stage of the ServiceResource definition allowing to specify targetSubscriptionId. */
- interface WithTargetSubscriptionId {
- /**
- * Specifies the targetSubscriptionId property: The subscription to which the resources in the service
- * belong to or should be deployed to..
- *
- * @param targetSubscriptionId The subscription to which the resources in the service belong to or should be
- * deployed to.
- * @return the next definition stage.
- */
- WithCreate withTargetSubscriptionId(String targetSubscriptionId);
+ WithCreate withExistingServiceTopology(String resourceGroupName, String serviceTopologyName);
}
/**
* The stage of the ServiceResource definition which contains all the minimum required properties for the
@@ -189,8 +147,7 @@ interface WithTags {
ServiceResource.Update update();
/** The template for ServiceResource update. */
- interface Update
- extends UpdateStages.WithTags, UpdateStages.WithTargetLocation, UpdateStages.WithTargetSubscriptionId {
+ interface Update extends UpdateStages.WithTags {
/**
* Executes the update request.
*
@@ -218,30 +175,6 @@ interface WithTags {
*/
Update withTags(Map tags);
}
- /** The stage of the ServiceResource update allowing to specify targetLocation. */
- interface WithTargetLocation {
- /**
- * Specifies the targetLocation property: The Azure location to which the resources in the service belong to
- * or should be deployed to..
- *
- * @param targetLocation The Azure location to which the resources in the service belong to or should be
- * deployed to.
- * @return the next definition stage.
- */
- Update withTargetLocation(String targetLocation);
- }
- /** The stage of the ServiceResource update allowing to specify targetSubscriptionId. */
- interface WithTargetSubscriptionId {
- /**
- * Specifies the targetSubscriptionId property: The subscription to which the resources in the service
- * belong to or should be deployed to..
- *
- * @param targetSubscriptionId The subscription to which the resources in the service belong to or should be
- * deployed to.
- * @return the next definition stage.
- */
- Update withTargetSubscriptionId(String targetSubscriptionId);
- }
}
/**
* Refreshes the resource to sync with Azure.
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceTopologyResource.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceTopologyResource.java
index e276ca5a86d4..0ca779e24a92 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceTopologyResource.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceTopologyResource.java
@@ -46,14 +46,6 @@ public interface ServiceTopologyResource {
*/
Map tags();
- /**
- * Gets the artifactSourceId property: The resource Id of the artifact source that contains the artifacts that can
- * be referenced in the service units.
- *
- * @return the artifactSourceId value.
- */
- String artifactSourceId();
-
/**
* Gets the region of the resource.
*
@@ -119,7 +111,7 @@ interface WithResourceGroup {
* The stage of the ServiceTopologyResource 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.WithTags, DefinitionStages.WithArtifactSourceId {
+ interface WithCreate extends DefinitionStages.WithTags {
/**
* Executes the create request.
*
@@ -145,18 +137,6 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
- /** The stage of the ServiceTopologyResource definition allowing to specify artifactSourceId. */
- interface WithArtifactSourceId {
- /**
- * Specifies the artifactSourceId property: The resource Id of the artifact source that contains the
- * artifacts that can be referenced in the service units..
- *
- * @param artifactSourceId The resource Id of the artifact source that contains the artifacts that can be
- * referenced in the service units.
- * @return the next definition stage.
- */
- WithCreate withArtifactSourceId(String artifactSourceId);
- }
}
/**
* Begins update for the ServiceTopologyResource resource.
@@ -166,7 +146,7 @@ interface WithArtifactSourceId {
ServiceTopologyResource.Update update();
/** The template for ServiceTopologyResource update. */
- interface Update extends UpdateStages.WithTags, UpdateStages.WithArtifactSourceId {
+ interface Update extends UpdateStages.WithTags {
/**
* Executes the update request.
*
@@ -194,18 +174,6 @@ interface WithTags {
*/
Update withTags(Map tags);
}
- /** The stage of the ServiceTopologyResource update allowing to specify artifactSourceId. */
- interface WithArtifactSourceId {
- /**
- * Specifies the artifactSourceId property: The resource Id of the artifact source that contains the
- * artifacts that can be referenced in the service units..
- *
- * @param artifactSourceId The resource Id of the artifact source that contains the artifacts that can be
- * referenced in the service units.
- * @return the next definition stage.
- */
- Update withArtifactSourceId(String artifactSourceId);
- }
}
/**
* Refreshes the resource to sync with Azure.
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceUnitResource.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceUnitResource.java
index e9868cf93014..b06f6bcfeefd 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceUnitResource.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/ServiceUnitResource.java
@@ -46,28 +46,6 @@ public interface ServiceUnitResource {
*/
Map tags();
- /**
- * Gets the targetResourceGroup property: The Azure Resource Group to which the resources in the service unit belong
- * to or should be deployed to.
- *
- * @return the targetResourceGroup value.
- */
- String targetResourceGroup();
-
- /**
- * Gets the deploymentMode property: Describes the type of ARM deployment to be performed on the resource.
- *
- * @return the deploymentMode value.
- */
- DeploymentMode deploymentMode();
-
- /**
- * Gets the artifacts property: The artifacts for the service unit.
- *
- * @return the artifacts value.
- */
- ServiceUnitArtifacts artifacts();
-
/**
* Gets the region of the resource.
*
@@ -94,8 +72,6 @@ interface Definition
extends DefinitionStages.Blank,
DefinitionStages.WithLocation,
DefinitionStages.WithParentResource,
- DefinitionStages.WithTargetResourceGroup,
- DefinitionStages.WithDeploymentMode,
DefinitionStages.WithCreate {
}
/** The ServiceUnitResource definition stages. */
@@ -131,37 +107,13 @@ interface WithParentResource {
* @param serviceName The name of the service resource.
* @return the next definition stage.
*/
- WithTargetResourceGroup withExistingService(
- String resourceGroupName, String serviceTopologyName, String serviceName);
- }
- /** The stage of the ServiceUnitResource definition allowing to specify targetResourceGroup. */
- interface WithTargetResourceGroup {
- /**
- * Specifies the targetResourceGroup property: The Azure Resource Group to which the resources in the
- * service unit belong to or should be deployed to..
- *
- * @param targetResourceGroup The Azure Resource Group to which the resources in the service unit belong to
- * or should be deployed to.
- * @return the next definition stage.
- */
- WithDeploymentMode withTargetResourceGroup(String targetResourceGroup);
- }
- /** The stage of the ServiceUnitResource definition allowing to specify deploymentMode. */
- interface WithDeploymentMode {
- /**
- * Specifies the deploymentMode property: Describes the type of ARM deployment to be performed on the
- * resource..
- *
- * @param deploymentMode Describes the type of ARM deployment to be performed on the resource.
- * @return the next definition stage.
- */
- WithCreate withDeploymentMode(DeploymentMode deploymentMode);
+ WithCreate withExistingService(String resourceGroupName, String serviceTopologyName, String serviceName);
}
/**
* The stage of the ServiceUnitResource 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.WithTags, DefinitionStages.WithArtifacts {
+ interface WithCreate extends DefinitionStages.WithTags {
/**
* Executes the create request.
*
@@ -187,16 +139,6 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
- /** The stage of the ServiceUnitResource definition allowing to specify artifacts. */
- interface WithArtifacts {
- /**
- * Specifies the artifacts property: The artifacts for the service unit..
- *
- * @param artifacts The artifacts for the service unit.
- * @return the next definition stage.
- */
- WithCreate withArtifacts(ServiceUnitArtifacts artifacts);
- }
}
/**
* Begins update for the ServiceUnitResource resource.
@@ -206,11 +148,7 @@ interface WithArtifacts {
ServiceUnitResource.Update update();
/** The template for ServiceUnitResource update. */
- interface Update
- extends UpdateStages.WithTags,
- UpdateStages.WithTargetResourceGroup,
- UpdateStages.WithDeploymentMode,
- UpdateStages.WithArtifacts {
+ interface Update extends UpdateStages.WithTags {
/**
* Executes the update request.
*
@@ -238,39 +176,6 @@ interface WithTags {
*/
Update withTags(Map tags);
}
- /** The stage of the ServiceUnitResource update allowing to specify targetResourceGroup. */
- interface WithTargetResourceGroup {
- /**
- * Specifies the targetResourceGroup property: The Azure Resource Group to which the resources in the
- * service unit belong to or should be deployed to..
- *
- * @param targetResourceGroup The Azure Resource Group to which the resources in the service unit belong to
- * or should be deployed to.
- * @return the next definition stage.
- */
- Update withTargetResourceGroup(String targetResourceGroup);
- }
- /** The stage of the ServiceUnitResource update allowing to specify deploymentMode. */
- interface WithDeploymentMode {
- /**
- * Specifies the deploymentMode property: Describes the type of ARM deployment to be performed on the
- * resource..
- *
- * @param deploymentMode Describes the type of ARM deployment to be performed on the resource.
- * @return the next definition stage.
- */
- Update withDeploymentMode(DeploymentMode deploymentMode);
- }
- /** The stage of the ServiceUnitResource update allowing to specify artifacts. */
- interface WithArtifacts {
- /**
- * Specifies the artifacts property: The artifacts for the service unit..
- *
- * @param artifacts The artifacts for the service unit.
- * @return the next definition stage.
- */
- Update withArtifacts(ServiceUnitArtifacts artifacts);
- }
}
/**
* Refreshes the resource to sync with Azure.
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/package-info.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/package-info.java
index ac14fd457034..872d676f8139 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/package-info.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/models/package-info.java
@@ -5,6 +5,6 @@
/**
* Package containing the data models for AzureDeploymentManager. REST APIs for orchestrating deployments using the
* Azure Deployment Manager (ADM). See
- * https://docs.microsoft.com/azure/azure-resource-manager/deployment-manager-overview for more information.
+ * https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview for more information.
*/
package com.azure.resourcemanager.deploymentmanager.models;
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/package-info.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/package-info.java
index cf6251194e12..75f6aa5bb928 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/package-info.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/package-info.java
@@ -5,6 +5,6 @@
/**
* Package containing the classes for AzureDeploymentManager. REST APIs for orchestrating deployments using the Azure
* Deployment Manager (ADM). See
- * https://docs.microsoft.com/azure/azure-resource-manager/deployment-manager-overview for more information.
+ * https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview for more information.
*/
package com.azure.resourcemanager.deploymentmanager;
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ArtifactSourcesCreateOrUpdateSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ArtifactSourcesCreateOrUpdateSamples.java
new file mode 100644
index 000000000000..07c42ddb36de
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ArtifactSourcesCreateOrUpdateSamples.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ArtifactSources CreateOrUpdate. */
+public final class ArtifactSourcesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_createorupdate.json
+ */
+ /**
+ * Sample code: Create artifact source.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createArtifactSource(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .artifactSources()
+ .define("myArtifactSource")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withTags(mapOf())
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_createorupdate_artifactroot.json
+ */
+ /**
+ * Sample code: Create artifact source with artifact root, an offset into the storage container.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createArtifactSourceWithArtifactRootAnOffsetIntoTheStorageContainer(
+ com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .artifactSources()
+ .define("myArtifactSource")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withTags(mapOf())
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ArtifactSourcesDeleteSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ArtifactSourcesDeleteSamples.java
new file mode 100644
index 000000000000..f753acb0b0a4
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ArtifactSourcesDeleteSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ArtifactSources Delete. */
+public final class ArtifactSourcesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_delete.json
+ */
+ /**
+ * Sample code: Delete artifact source.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void deleteArtifactSource(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.artifactSources().deleteWithResponse("myResourceGroup", "myArtifactSource", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ArtifactSourcesGetByResourceGroupSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ArtifactSourcesGetByResourceGroupSamples.java
new file mode 100644
index 000000000000..860895005d5e
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ArtifactSourcesGetByResourceGroupSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ArtifactSources GetByResourceGroup. */
+public final class ArtifactSourcesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsource_get.json
+ */
+ /**
+ * Sample code: Get artifact source.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getArtifactSource(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.artifactSources().getByResourceGroupWithResponse("myResourceGroup", "myArtifactSource", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ArtifactSourcesListSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ArtifactSourcesListSamples.java
new file mode 100644
index 000000000000..b4ff407e557d
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ArtifactSourcesListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ArtifactSources List. */
+public final class ArtifactSourcesListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/artifactsources_list.json
+ */
+ /**
+ * Sample code: List steps.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void listSteps(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.artifactSources().listWithResponse("myResourceGroup", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/OperationsListSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/OperationsListSamples.java
new file mode 100644
index 000000000000..59fc5803504f
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/OperationsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/operations_list.json
+ */
+ /**
+ * Sample code: Get operations.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getOperations(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.operations().listWithResponse(Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsCancelSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsCancelSamples.java
new file mode 100644
index 000000000000..7a3cfd919a55
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsCancelSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Rollouts Cancel. */
+public final class RolloutsCancelSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_post_cancel.json
+ */
+ /**
+ * Sample code: Cancel rollout.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void cancelRollout(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.rollouts().cancelWithResponse("myResourceGroup", "myRollout", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsCreateOrUpdateSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsCreateOrUpdateSamples.java
new file mode 100644
index 000000000000..a12af7a32233
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsCreateOrUpdateSamples.java
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.resourcemanager.deploymentmanager.models.Identity;
+import com.azure.resourcemanager.deploymentmanager.models.PrePostStep;
+import com.azure.resourcemanager.deploymentmanager.models.StepGroup;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Rollouts CreateOrUpdate. */
+public final class RolloutsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_createorupdate.json
+ */
+ /**
+ * Sample code: Create or update rollout.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createOrUpdateRollout(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .rollouts()
+ .define("myRollout")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withIdentity(
+ new Identity()
+ .withType("userAssigned")
+ .withIdentityIds(
+ Arrays
+ .asList(
+ "/subscriptions/caac1590-e859-444f-a9e0-62091c0f5929/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userassignedidentities/myuseridentity")))
+ .withBuildVersion("1.0.0.1")
+ .withTargetServiceTopologyId(
+ "/subscriptions/caac1590-e859-444f-a9e0-62091c0f5929/resourceGroups/myResourceGroup/Microsoft.DeploymentManager/serviceTopologies/myTopology")
+ .withStepGroups(
+ Arrays
+ .asList(
+ new StepGroup()
+ .withName("FirstRegion")
+ .withPreDeploymentSteps(
+ Arrays
+ .asList(
+ new PrePostStep()
+ .withStepId("Microsoft.DeploymentManager/steps/preDeployStep1"),
+ new PrePostStep()
+ .withStepId("Microsoft.DeploymentManager/steps/preDeployStep2")))
+ .withDeploymentTargetId(
+ "Microsoft.DeploymentManager/serviceTopologies/myTopology/services/myService/serviceUnits/myServiceUnit1'")
+ .withPostDeploymentSteps(
+ Arrays
+ .asList(
+ new PrePostStep()
+ .withStepId("Microsoft.DeploymentManager/steps/postDeployStep1"))),
+ new StepGroup()
+ .withName("SecondRegion")
+ .withDependsOnStepGroups(Arrays.asList("FirstRegion"))
+ .withPreDeploymentSteps(
+ Arrays
+ .asList(
+ new PrePostStep()
+ .withStepId("Microsoft.DeploymentManager/steps/preDeployStep3"),
+ new PrePostStep()
+ .withStepId("Microsoft.DeploymentManager/steps/preDeployStep4")))
+ .withDeploymentTargetId(
+ "Microsoft.DeploymentManager/serviceTopologies/myTopology/services/myService/serviceUnits/myServiceUnit2'")
+ .withPostDeploymentSteps(
+ Arrays
+ .asList(
+ new PrePostStep()
+ .withStepId("Microsoft.DeploymentManager/steps/postDeployStep5")))))
+ .withTags(mapOf())
+ .withArtifactSourceId(
+ "/subscriptions/caac1590-e859-444f-a9e0-62091c0f5929/resourceGroups/myResourceGroup/Microsoft.DeploymentManager/artifactSources/myArtifactSource")
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsDeleteSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsDeleteSamples.java
new file mode 100644
index 000000000000..37fc850460b3
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsDeleteSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Rollouts Delete. */
+public final class RolloutsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_delete.json
+ */
+ /**
+ * Sample code: Delete rollout.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void deleteRollout(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.rollouts().deleteWithResponse("myResourceGroup", "myRollout", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsGetByResourceGroupSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsGetByResourceGroupSamples.java
new file mode 100644
index 000000000000..9fd357faa184
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsGetByResourceGroupSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Rollouts GetByResourceGroup. */
+public final class RolloutsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_get.json
+ */
+ /**
+ * Sample code: Get rollout.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getRollout(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.rollouts().getByResourceGroupWithResponse("myResourceGroup", "myRollout", null, Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsListSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsListSamples.java
new file mode 100644
index 000000000000..64e987c40bff
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsListSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Rollouts List. */
+public final class RolloutsListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollouts_list.json
+ */
+ /**
+ * Sample code: List rollouts by resource group.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void listRolloutsByResourceGroup(
+ com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.rollouts().listWithResponse("myResourceGroup", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsRestartSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsRestartSamples.java
new file mode 100644
index 000000000000..0332fe51a5fd
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/RolloutsRestartSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Rollouts Restart. */
+public final class RolloutsRestartSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/rollout_post_restart.json
+ */
+ /**
+ * Sample code: Restart rollout.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void restartRollout(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.rollouts().restartWithResponse("myResourceGroup", "myRollout", true, Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceTopologiesCreateOrUpdateSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceTopologiesCreateOrUpdateSamples.java
new file mode 100644
index 000000000000..cb4351a0b32f
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceTopologiesCreateOrUpdateSamples.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ServiceTopologies CreateOrUpdate. */
+public final class ServiceTopologiesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_createorupdate.json
+ */
+ /**
+ * Sample code: Create a topology with Artifact Source.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createATopologyWithArtifactSource(
+ com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .serviceTopologies()
+ .define("myTopology")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withTags(mapOf())
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_createorupdate_noartifactsource.json
+ */
+ /**
+ * Sample code: Create a topology without Artifact Source.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createATopologyWithoutArtifactSource(
+ com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .serviceTopologies()
+ .define("myTopology")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withTags(mapOf())
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceTopologiesDeleteSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceTopologiesDeleteSamples.java
new file mode 100644
index 000000000000..fcc97e1bbe12
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceTopologiesDeleteSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ServiceTopologies Delete. */
+public final class ServiceTopologiesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_delete.json
+ */
+ /**
+ * Sample code: Delete topology.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void deleteTopology(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.serviceTopologies().deleteWithResponse("myResourceGroup", "myTopology", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceTopologiesGetByResourceGroupSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceTopologiesGetByResourceGroupSamples.java
new file mode 100644
index 000000000000..f978fd7f0a02
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceTopologiesGetByResourceGroupSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ServiceTopologies GetByResourceGroup. */
+public final class ServiceTopologiesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopology_get.json
+ */
+ /**
+ * Sample code: Get topology.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getTopology(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.serviceTopologies().getByResourceGroupWithResponse("myResourceGroup", "myTopology", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceTopologiesListSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceTopologiesListSamples.java
new file mode 100644
index 000000000000..7073ecfe413f
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceTopologiesListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ServiceTopologies List. */
+public final class ServiceTopologiesListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/servicetopologies_list.json
+ */
+ /**
+ * Sample code: List topologies.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void listTopologies(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.serviceTopologies().listWithResponse("myResourceGroup", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceUnitsCreateOrUpdateSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceUnitsCreateOrUpdateSamples.java
new file mode 100644
index 000000000000..2c47ea0ce9c4
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceUnitsCreateOrUpdateSamples.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ServiceUnits CreateOrUpdate. */
+public final class ServiceUnitsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_createorupdate.json
+ */
+ /**
+ * Sample code: Create service unit using relative paths into the artifact source.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createServiceUnitUsingRelativePathsIntoTheArtifactSource(
+ com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .serviceUnits()
+ .define("myServiceUnit")
+ .withRegion("centralus")
+ .withExistingService("myResourceGroup", "myTopology", "myService")
+ .withTags(mapOf())
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_createorupdate_noartifactsource.json
+ */
+ /**
+ * Sample code: Create service unit using SAS URIs.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createServiceUnitUsingSASURIs(
+ com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .serviceUnits()
+ .define("myServiceUnit")
+ .withRegion("centralus")
+ .withExistingService("myResourceGroup", "myTopology", "myService")
+ .withTags(mapOf())
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceUnitsDeleteSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceUnitsDeleteSamples.java
new file mode 100644
index 000000000000..46b10afc8671
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceUnitsDeleteSamples.java
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ServiceUnits Delete. */
+public final class ServiceUnitsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_delete.json
+ */
+ /**
+ * Sample code: Delete service unit.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void deleteServiceUnit(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .serviceUnits()
+ .deleteWithResponse("myResourceGroup", "myTopology", "myService", "myServiceUnit", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceUnitsGetSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceUnitsGetSamples.java
new file mode 100644
index 000000000000..1686dd84c314
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceUnitsGetSamples.java
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ServiceUnits Get. */
+public final class ServiceUnitsGetSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunit_get.json
+ */
+ /**
+ * Sample code: Get service unit.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getServiceUnit(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .serviceUnits()
+ .getWithResponse("myResourceGroup", "myTopology", "myService", "myServiceUnit", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceUnitsListSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceUnitsListSamples.java
new file mode 100644
index 000000000000..e6f5e5979b00
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServiceUnitsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ServiceUnits List. */
+public final class ServiceUnitsListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/serviceunits_list.json
+ */
+ /**
+ * Sample code: List service units.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void listServiceUnits(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.serviceUnits().listWithResponse("myResourceGroup", "myTopology", "myService", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServicesCreateOrUpdateSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServicesCreateOrUpdateSamples.java
new file mode 100644
index 000000000000..bd74fe11db76
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServicesCreateOrUpdateSamples.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Services CreateOrUpdate. */
+public final class ServicesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/service_createorupdate.json
+ */
+ /**
+ * Sample code: Create service.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createService(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .services()
+ .define("myService")
+ .withRegion("centralus")
+ .withExistingServiceTopology("myResourceGroup", "myTopology")
+ .withTags(mapOf())
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServicesDeleteSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServicesDeleteSamples.java
new file mode 100644
index 000000000000..c5a931b6e097
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServicesDeleteSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Services Delete. */
+public final class ServicesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/service_delete.json
+ */
+ /**
+ * Sample code: Delete service.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void deleteService(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.services().deleteWithResponse("myResourceGroup", "myTopology", "myService", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServicesGetSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServicesGetSamples.java
new file mode 100644
index 000000000000..face55c79d9e
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServicesGetSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Services Get. */
+public final class ServicesGetSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/service_get.json
+ */
+ /**
+ * Sample code: Get service.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getService(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.services().getWithResponse("myResourceGroup", "myTopology", "myService", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServicesListSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServicesListSamples.java
new file mode 100644
index 000000000000..4be18916f809
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/ServicesListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Services List. */
+public final class ServicesListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/services_list.json
+ */
+ /**
+ * Sample code: List services.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void listServices(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.services().listWithResponse("myResourceGroup", "myTopology", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/StepsCreateOrUpdateSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/StepsCreateOrUpdateSamples.java
new file mode 100644
index 000000000000..7d5594bc3189
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/StepsCreateOrUpdateSamples.java
@@ -0,0 +1,132 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.resourcemanager.deploymentmanager.models.ApiKeyAuthentication;
+import com.azure.resourcemanager.deploymentmanager.models.HealthCheckStepProperties;
+import com.azure.resourcemanager.deploymentmanager.models.RestAuthLocation;
+import com.azure.resourcemanager.deploymentmanager.models.RestHealthCheck;
+import com.azure.resourcemanager.deploymentmanager.models.RestHealthCheckStepAttributes;
+import com.azure.resourcemanager.deploymentmanager.models.RestMatchQuantifier;
+import com.azure.resourcemanager.deploymentmanager.models.RestRequest;
+import com.azure.resourcemanager.deploymentmanager.models.RestRequestMethod;
+import com.azure.resourcemanager.deploymentmanager.models.RestResponse;
+import com.azure.resourcemanager.deploymentmanager.models.RestResponseRegex;
+import com.azure.resourcemanager.deploymentmanager.models.WaitStepAttributes;
+import com.azure.resourcemanager.deploymentmanager.models.WaitStepProperties;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Steps CreateOrUpdate. */
+public final class StepsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_health_check_createorupdate.json
+ */
+ /**
+ * Sample code: Create health check step.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createHealthCheckStep(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .steps()
+ .define("healthCheckStep")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withProperties(
+ new HealthCheckStepProperties()
+ .withAttributes(
+ new RestHealthCheckStepAttributes()
+ .withWaitDuration("PT15M")
+ .withMaxElasticDuration("PT30M")
+ .withHealthyStateDuration("PT2H")
+ .withHealthChecks(
+ Arrays
+ .asList(
+ new RestHealthCheck()
+ .withName("appHealth")
+ .withRequest(
+ new RestRequest()
+ .withMethod(RestRequestMethod.GET)
+ .withUri(
+ "https://resthealth.healthservice.com/api/applications/contosoApp/healthStatus")
+ .withAuthentication(
+ new ApiKeyAuthentication()
+ .withName("Code")
+ .withIn(RestAuthLocation.QUERY)
+ .withValue(
+ "NBCapiMOBQyAAbCkeytoPadnvO0eGHmidwFz5rXpappznKp3Jt7LLg==")))
+ .withResponse(
+ new RestResponse()
+ .withSuccessStatusCodes(Arrays.asList("OK"))
+ .withRegex(
+ new RestResponseRegex()
+ .withMatches(
+ Arrays
+ .asList(
+ "(?i)Contoso-App",
+ "(?i)\"health_status\":((.|\n"
+ + ")*)\"(green|yellow)\"",
+ "(?mi)^(\"application_host\": 94781052)$"))
+ .withMatchQuantifier(RestMatchQuantifier.ALL))),
+ new RestHealthCheck()
+ .withName("serviceHealth")
+ .withRequest(
+ new RestRequest()
+ .withMethod(RestRequestMethod.GET)
+ .withUri(
+ "https://resthealth.healthservice.com/api/services/contosoService/healthStatus")
+ .withAuthentication(
+ new ApiKeyAuthentication()
+ .withName("code")
+ .withIn(RestAuthLocation.HEADER)
+ .withValue(
+ "NBCapiMOBQyAAbCkeytoPadnvO0eGHmidwFz5rXpappznKp3Jt7LLg==")))
+ .withResponse(
+ new RestResponse()
+ .withSuccessStatusCodes(Arrays.asList("OK"))
+ .withRegex(
+ new RestResponseRegex()
+ .withMatches(
+ Arrays
+ .asList(
+ "(?i)Contoso-Service-EndToEnd",
+ "(?i)\"health_status\":((.|\n)*)\"(green)\""))
+ .withMatchQuantifier(RestMatchQuantifier.ALL)))))))
+ .withTags(mapOf())
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_wait_createorupdate.json
+ */
+ /**
+ * Sample code: Create wait step.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void createWaitStep(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager
+ .steps()
+ .define("waitStep")
+ .withRegion("centralus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withProperties(new WaitStepProperties().withAttributes(new WaitStepAttributes().withDuration("PT20M")))
+ .withTags(mapOf())
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/StepsDeleteSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/StepsDeleteSamples.java
new file mode 100644
index 000000000000..d693f99b103f
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/StepsDeleteSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Steps Delete. */
+public final class StepsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_delete.json
+ */
+ /**
+ * Sample code: Delete deployment step.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void deleteDeploymentStep(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.steps().deleteWithResponse("myResourceGroup", "deploymentStep1", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/StepsGetByResourceGroupSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/StepsGetByResourceGroupSamples.java
new file mode 100644
index 000000000000..88e1b4cd3975
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/StepsGetByResourceGroupSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Steps GetByResourceGroup. */
+public final class StepsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_get.json
+ */
+ /**
+ * Sample code: Get deployment step.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void getDeploymentStep(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.steps().getByResourceGroupWithResponse("myResourceGroup", "waitStep", Context.NONE);
+ }
+}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/StepsListSamples.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/StepsListSamples.java
new file mode 100644
index 000000000000..ec11b78887ce
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/samples/java/com/azure/resourcemanager/deploymentmanager/generated/StepsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.deploymentmanager.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Steps List. */
+public final class StepsListSamples {
+ /*
+ * x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/steps_list.json
+ */
+ /**
+ * Sample code: List steps.
+ *
+ * @param manager Entry point to DeploymentManager.
+ */
+ public static void listSteps(com.azure.resourcemanager.deploymentmanager.DeploymentManager manager) {
+ manager.steps().listWithResponse("myResourceGroup", Context.NONE);
+ }
+}