diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/CHANGELOG.md b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/CHANGELOG.md
index f2e0cab9056e5..175221c681d83 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 (2022-06-14)
+- 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 c0fb3888e4bbf..baaa80434f5ae 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.resourcemanagerazure-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 0000000000000..072bfa16ebe7d
--- /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 94f8cec0dbcb1..7ac0d5d9e12f1 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml
@@ -1,55 +1,55 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-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
-
-
-
- com.azure
- azure-core
- 1.29.1
-
-
- com.azure
- azure-core-management
- 1.6.2
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.29.1
+
+
+ com.azure
+ azure-core-management
+ 1.6.2
+
+
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 f0117a01b7975..32babc3ddb8bd 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,15 +8,18 @@
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.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
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 +44,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;
@@ -88,6 +92,19 @@ public static DeploymentManager authenticate(TokenCredential credential, AzurePr
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of Deployment service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the Deployment service API instance.
+ */
+ public static DeploymentManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new DeploymentManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create DeploymentManager with optional configuration.
*
@@ -99,12 +116,14 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -143,6 +162,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.
*
@@ -154,6 +184,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -161,9 +204,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -199,20 +244,38 @@ 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);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
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 =
@@ -224,7 +287,11 @@ public DeploymentManager authenticate(TokenCredential credential, AzureProfile p
}
}
- /** @return Resource collection API of ServiceTopologies. */
+ /**
+ * Gets the resource collection API of ServiceTopologies. It manages ServiceTopologyResource.
+ *
+ * @return Resource collection API of ServiceTopologies.
+ */
public ServiceTopologies serviceTopologies() {
if (this.serviceTopologies == null) {
this.serviceTopologies = new ServiceTopologiesImpl(clientObject.getServiceTopologies(), this);
@@ -232,7 +299,11 @@ public ServiceTopologies serviceTopologies() {
return serviceTopologies;
}
- /** @return Resource collection API of Services. */
+ /**
+ * Gets the resource collection API of Services. It manages ServiceResource.
+ *
+ * @return Resource collection API of Services.
+ */
public Services services() {
if (this.services == null) {
this.services = new ServicesImpl(clientObject.getServices(), this);
@@ -240,7 +311,11 @@ public Services services() {
return services;
}
- /** @return Resource collection API of ServiceUnits. */
+ /**
+ * Gets the resource collection API of ServiceUnits. It manages ServiceUnitResource.
+ *
+ * @return Resource collection API of ServiceUnits.
+ */
public ServiceUnits serviceUnits() {
if (this.serviceUnits == null) {
this.serviceUnits = new ServiceUnitsImpl(clientObject.getServiceUnits(), this);
@@ -248,7 +323,11 @@ public ServiceUnits serviceUnits() {
return serviceUnits;
}
- /** @return Resource collection API of Steps. */
+ /**
+ * Gets the resource collection API of Steps. It manages StepResource.
+ *
+ * @return Resource collection API of Steps.
+ */
public Steps steps() {
if (this.steps == null) {
this.steps = new StepsImpl(clientObject.getSteps(), this);
@@ -256,7 +335,11 @@ public Steps steps() {
return steps;
}
- /** @return Resource collection API of Rollouts. */
+ /**
+ * Gets the resource collection API of Rollouts. It manages RolloutRequest.
+ *
+ * @return Resource collection API of Rollouts.
+ */
public Rollouts rollouts() {
if (this.rollouts == null) {
this.rollouts = new RolloutsImpl(clientObject.getRollouts(), this);
@@ -264,7 +347,11 @@ public Rollouts rollouts() {
return rollouts;
}
- /** @return Resource collection API of ArtifactSources. */
+ /**
+ * Gets the resource collection API of ArtifactSources. It manages ArtifactSource.
+ *
+ * @return Resource collection API of ArtifactSources.
+ */
public ArtifactSources artifactSources() {
if (this.artifactSources == null) {
this.artifactSources = new ArtifactSourcesImpl(clientObject.getArtifactSources(), this);
@@ -272,7 +359,11 @@ public ArtifactSources artifactSources() {
return artifactSources;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ArtifactSourcesClient.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ArtifactSourcesClient.java
index fffc4183b45e8..9066330db8642 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ArtifactSourcesClient.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ArtifactSourcesClient.java
@@ -36,7 +36,8 @@ public interface ArtifactSourcesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the resource that defines the source location where the artifacts are located.
+ * @return the resource that defines the source location where the artifacts are located along with {@link
+ * Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -64,7 +65,7 @@ Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an artifact source.
+ * @return an artifact source along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -91,7 +92,7 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String artifactSourceName, Context context);
@@ -116,7 +117,7 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of artifact sources.
+ * @return the list of artifact sources along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response> listWithResponse(String resourceGroupName, Context context);
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/OperationsClient.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/OperationsClient.java
index b7c13ede2daaa..13f4c24ad3a10 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/OperationsClient.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/OperationsClient.java
@@ -29,7 +29,7 @@ public interface OperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the operations response.
+ * @return the operations response along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response listWithResponse(Context context);
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 e1161735dd62c..af5e925154de8 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
@@ -26,9 +26,9 @@ public interface RolloutsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return defines the PUT rollout request body.
+ * @return the {@link SyncPoller} for polling of 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);
@@ -43,9 +43,9 @@ SyncPoller, RolloutRequestInner> beginCreateOrUp
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return defines the PUT rollout request body.
+ * @return the {@link SyncPoller} for polling of 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);
@@ -120,7 +120,7 @@ RolloutRequestInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return detailed information of a rollout.
+ * @return detailed information of a rollout along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -147,7 +147,7 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String rolloutName, Context context);
@@ -174,7 +174,7 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return defines the rollout.
+ * @return defines the rollout along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response cancelWithResponse(String resourceGroupName, String rolloutName, Context context);
@@ -204,7 +204,7 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return defines the rollout.
+ * @return defines the rollout along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response restartWithResponse(
@@ -230,7 +230,7 @@ Response restartWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of rollouts.
+ * @return the list of rollouts along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response> listWithResponse(String resourceGroupName, Context context);
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ServiceTopologiesClient.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ServiceTopologiesClient.java
index fb658dd12aa30..e3968b2df2883 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ServiceTopologiesClient.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ServiceTopologiesClient.java
@@ -38,7 +38,7 @@ ServiceTopologyResourceInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the resource representation of a service topology.
+ * @return the resource representation of a service topology along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -69,7 +69,7 @@ Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the service topology.
+ * @return the service topology along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -96,7 +96,7 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String serviceTopologyName, Context context);
@@ -121,7 +121,7 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of service topologies.
+ * @return the list of service topologies along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response> listWithResponse(String resourceGroupName, 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 e18a0cc4ba7d5..1e270b72853d5 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
@@ -27,9 +27,9 @@ public interface ServiceUnitsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents the response of a service unit resource.
+ * @return the {@link SyncPoller} for polling of 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,
@@ -50,9 +50,9 @@ SyncPoller, ServiceUnitResourceInner> begin
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents the response of a service unit resource.
+ * @return the {@link SyncPoller} for polling of 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,
@@ -134,7 +134,7 @@ ServiceUnitResourceInner get(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the service unit.
+ * @return the service unit along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -169,7 +169,7 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
@@ -203,7 +203,7 @@ Response deleteWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of service units.
+ * @return the list of service units along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response> listWithResponse(
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ServicesClient.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ServicesClient.java
index 130e1d34a6384..073d6b862ddeb 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ServicesClient.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ServicesClient.java
@@ -40,7 +40,7 @@ ServiceResourceInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the resource representation of a service in a service topology.
+ * @return the resource representation of a service in a service topology along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -74,7 +74,7 @@ Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the service.
+ * @return the service along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -103,7 +103,7 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
@@ -131,7 +131,7 @@ Response deleteWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of services.
+ * @return the list of services along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response> listWithResponse(
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/StepsClient.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/StepsClient.java
index d354d32b916ad..ede190f72c7af 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/StepsClient.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/StepsClient.java
@@ -36,7 +36,7 @@ public interface StepsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the resource representation of a rollout step.
+ * @return the resource representation of a rollout step along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -64,7 +64,7 @@ Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the step.
+ * @return the step along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -91,7 +91,7 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String stepName, Context context);
@@ -116,7 +116,7 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of steps.
+ * @return the list of steps along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response> listWithResponse(String resourceGroupName, Context context);
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 18bf9a1f0d75a..af9bafa8ca440 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,26 @@
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 {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactSourceInner.class);
-
+public final class ArtifactSourceInner extends Resource {
/*
- * The type of artifact source used.
- */
- @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.
+ * The properties that define the artifact source.
*/
- 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 +47,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 77%
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 6bc1870776d69..0ac9d795a000d 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,17 +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.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.deploymentmanager.models.ArtifactSourcePropertiesAutoGenerated;
+import com.azure.resourcemanager.deploymentmanager.models.Authentication;
/** The properties that define the artifact source. */
-@Immutable
+@Fluent
public final class ArtifactSourceProperties extends ArtifactSourcePropertiesAutoGenerated {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactSourceProperties.class);
-
/** {@inheritDoc} */
@Override
public ArtifactSourceProperties withSourceType(String sourceType) {
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/OperationsListInner.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/OperationsListInner.java
index 61555aca17c25..8c2122e1906e9 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/OperationsListInner.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/OperationsListInner.java
@@ -5,16 +5,12 @@
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.Operation;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The operations response. */
@Fluent
public final class OperationsListInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsListInner.class);
-
/*
* The list of supported operations
*/
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 0000000000000..828d295d93e85
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/RestParameters.java
@@ -0,0 +1,58 @@
+// 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.JsonProperty;
+import java.util.List;
+
+/** The parameters for the REST health check. */
+@Fluent
+public final class RestParameters {
+ /*
+ * 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());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(RestParameters.class);
+}
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 16bf84f5e31a2..73b60693bb709 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,24 +5,18 @@
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;
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;
import java.util.Map;
/** Defines the rollout. */
-@JsonFlatten
@Fluent
-public class RolloutInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RolloutInner.class);
-
+public final class RolloutInner extends Resource {
/*
* Identity for the resource.
*/
@@ -30,74 +24,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 +115,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 +125,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 +138,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 +148,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 +162,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 +173,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 +186,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 +196,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 +212,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 90%
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 b93f35bd0be1b..32d57046318aa 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,19 +2,18 @@
// 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.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.core.annotation.Fluent;
+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.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);
-
/*
* The current status of the rollout.
*/
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 528f39e1dbe6b..fa9a20662e333 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,22 +5,17 @@
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;
import com.azure.resourcemanager.deploymentmanager.models.StepGroup;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
/** Defines the PUT rollout request body. */
-@JsonFlatten
@Fluent
-public class RolloutRequestInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RolloutRequestInner.class);
-
+public final class RolloutRequestInner extends Resource {
/*
* Identity for the resource.
*/
@@ -28,30 +23,10 @@ public class RolloutRequestInner extends Resource {
private Identity identity;
/*
- * The version of the build being deployed.
- */
- @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.
+ * Defines the properties that make up a rollout request.
*/
- @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 +48,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 +87,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 +100,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 +110,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 +124,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 +135,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 +148,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 +158,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;
}
@@ -176,30 +172,21 @@ public RolloutRequestInner withTags(Map tags) {
*/
public void validate() {
if (identity() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property identity in model RolloutRequestInner"));
} else {
identity().validate();
}
- if (buildVersion() == null) {
- throw logger
+ 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();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(RolloutRequestInner.class);
}
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 94%
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 439bcc519eb98..4024061160b31 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,19 +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.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.deploymentmanager.models.StepGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The properties for defining a rollout. */
@Fluent
public class RolloutRequestProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RolloutRequestProperties.class);
-
/*
* The version of the build being deployed.
*/
@@ -130,19 +128,19 @@ public RolloutRequestProperties withStepGroups(List stepGroups) {
*/
public void validate() {
if (buildVersion() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property buildVersion in model RolloutRequestProperties"));
}
if (targetServiceTopologyId() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property targetServiceTopologyId in model RolloutRequestProperties"));
}
if (stepGroups() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property stepGroups in model RolloutRequestProperties"));
@@ -150,4 +148,6 @@ public void validate() {
stepGroups().forEach(e -> e.validate());
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(RolloutRequestProperties.class);
}
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 0000000000000..bf59415337395
--- /dev/null
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/SasProperties.java
@@ -0,0 +1,58 @@
+// 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.JsonProperty;
+
+/** The properties that define SAS authentication. */
+@Fluent
+public final class SasProperties {
+ /*
+ * 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"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(SasProperties.class);
+}
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 e79ad40f96827..538cd84f2a275 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,75 +5,27 @@
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;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** The resource representation of a service in a service topology. */
-@JsonFlatten
@Fluent
-public 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.
- */
- @JsonProperty(value = "properties.targetLocation", required = true)
- private String targetLocation;
-
+public final class ServiceResourceInner extends Resource {
/*
- * The subscription 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.targetSubscriptionId", required = true)
- private String targetSubscriptionId;
+ @JsonProperty(value = "properties", required = true)
+ private ServiceResourceProperties innerProperties = new ServiceResourceProperties();
/**
- * Get the targetLocation property: The Azure location 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.
*
- * @return the targetLocation value.
+ * @return the innerProperties 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;
- }
-
- /**
- * Set the targetSubscriptionId property: The subscription to which the resources in the service belong to or should
- * be deployed to.
- *
- * @param targetSubscriptionId the targetSubscriptionId value to set.
- * @return the ServiceResourceInner object itself.
- */
- public ServiceResourceInner withTargetSubscriptionId(String targetSubscriptionId) {
- this.targetSubscriptionId = targetSubscriptionId;
- return this;
+ private ServiceResourceProperties innerProperties() {
+ return this.innerProperties;
}
/** {@inheritDoc} */
@@ -96,17 +48,15 @@ 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) {
- throw logger
+ 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();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ServiceResourceInner.class);
}
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 74%
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 c846a0ecd9af5..4e026552a53ec 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,17 +2,14 @@
// 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.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.deploymentmanager.models.ServiceProperties;
/** 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);
-
/** {@inheritDoc} */
@Override
public ServiceResourceProperties withTargetLocation(String targetLocation) {
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 c496a72a722e3..f8e144e6d8c09 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,46 +5,27 @@
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;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** The resource representation of a service topology. */
-@JsonFlatten
@Fluent
-public class ServiceTopologyResourceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceTopologyResourceInner.class);
-
+public final class ServiceTopologyResourceInner extends Resource {
/*
- * The resource Id of the artifact source that contains the artifacts that
- * can be referenced in the service units.
- */
- @JsonProperty(value = "properties.artifactSourceId")
- private String artifactSourceId;
-
- /**
- * Get 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.
+ * The properties that define the service topology.
*/
- public String artifactSourceId() {
- return this.artifactSourceId;
- }
+ @JsonProperty(value = "properties", required = true)
+ private ServiceTopologyResourceProperties innerProperties = new ServiceTopologyResourceProperties();
/**
- * Set 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.
*
- * @param artifactSourceId the artifactSourceId value to set.
- * @return the ServiceTopologyResourceInner object itself.
+ * @return the innerProperties value.
*/
- public ServiceTopologyResourceInner withArtifactSourceId(String artifactSourceId) {
- this.artifactSourceId = artifactSourceId;
- return this;
+ private ServiceTopologyResourceProperties innerProperties() {
+ return this.innerProperties;
}
/** {@inheritDoc} */
@@ -67,5 +48,15 @@ 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();
+ }
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ServiceTopologyResourceInner.class);
}
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 68%
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 e2874a346f756..86de44380d883 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,17 +2,14 @@
// 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.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.deploymentmanager.models.ServiceTopologyProperties;
/** The properties that define the service topology. */
-@Immutable
+@Fluent
public final class ServiceTopologyResourceProperties extends ServiceTopologyProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceTopologyResourceProperties.class);
-
/** {@inheritDoc} */
@Override
public ServiceTopologyResourceProperties withArtifactSourceId(String artifactSourceId) {
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 2472e22896994..4b625c48b70fe 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,27 @@
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 {
- @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.
- */
- @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;
-
+public final class ServiceUnitResourceInner extends Resource {
/*
- * 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;
- }
-
- /**
- * Get the deploymentMode property: Describes the type of ARM deployment to be performed on the resource.
- *
- * @return the deploymentMode 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.
+ * The properties that define the service unit.
*/
- public ServiceUnitArtifacts artifacts() {
- return this.artifacts;
- }
+ @JsonProperty(value = "properties", required = true)
+ private ServiceUnitResourceProperties innerProperties = new ServiceUnitResourceProperties();
/**
- * Set the artifacts property: The artifacts for the service unit.
+ * Get the innerProperties property: The properties that define the service unit.
*
- * @param artifacts the artifacts value to set.
- * @return the ServiceUnitResourceInner object itself.
+ * @return the innerProperties value.
*/
- public ServiceUnitResourceInner withArtifacts(ServiceUnitArtifacts artifacts) {
- this.artifacts = artifacts;
- return this;
+ private ServiceUnitResourceProperties innerProperties() {
+ return this.innerProperties;
}
/** {@inheritDoc} */
@@ -121,20 +48,15 @@ public ServiceUnitResourceInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (targetResourceGroup() == null) {
- throw logger
+ 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();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ServiceUnitResourceInner.class);
}
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 76%
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 a0635d1451d61..12a262ad599ea 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,17 +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.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.deploymentmanager.models.DeploymentMode;
+import com.azure.resourcemanager.deploymentmanager.models.ServiceUnitArtifacts;
+import com.azure.resourcemanager.deploymentmanager.models.ServiceUnitProperties;
/** The properties that define the service unit. */
-@Immutable
+@Fluent
public final class ServiceUnitResourceProperties extends ServiceUnitProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceUnitResourceProperties.class);
-
/** {@inheritDoc} */
@Override
public ServiceUnitResourceProperties withTargetResourceGroup(String targetResourceGroup) {
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/StepResourceInner.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/StepResourceInner.java
index 3040041be1efe..fbd0527449b7b 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/StepResourceInner.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/models/StepResourceInner.java
@@ -8,15 +8,12 @@
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.deploymentmanager.models.StepProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** The resource representation of a rollout step. */
@Fluent
public final class StepResourceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(StepResourceInner.class);
-
/*
* The properties that define the step.
*/
@@ -64,11 +61,13 @@ public StepResourceInner withTags(Map tags) {
*/
public void validate() {
if (properties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property properties in model StepResourceInner"));
} else {
properties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(StepResourceInner.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 4247ac6f220ea..7cc5535347d89 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 b773ef427af36..9230ccea9da41 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 c3daf0df59628..99679d68d0934 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());
}
@@ -62,6 +49,10 @@ public String regionName() {
return this.location();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public ArtifactSourceInner innerModel() {
return this.innerObject;
}
@@ -171,19 +162,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/ArtifactSourcesClientImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ArtifactSourcesClientImpl.java
index 958dd4083f08f..152b483a1ba18 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ArtifactSourcesClientImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ArtifactSourcesClientImpl.java
@@ -24,7 +24,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.deploymentmanager.fluent.ArtifactSourcesClient;
import com.azure.resourcemanager.deploymentmanager.fluent.models.ArtifactSourceInner;
import java.util.List;
@@ -32,8 +31,6 @@
/** An instance of this class provides access to all the operations defined in ArtifactSourcesClient. */
public final class ArtifactSourcesClientImpl implements ArtifactSourcesClient {
- private final ClientLogger logger = new ClientLogger(ArtifactSourcesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final ArtifactSourcesService service;
@@ -128,7 +125,8 @@ Mono>> list(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the resource that defines the source location where the artifacts are located.
+ * @return the resource that defines the source location where the artifacts are located along with {@link Response}
+ * on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(
@@ -183,7 +181,8 @@ private Mono> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the resource that defines the source location where the artifacts are located.
+ * @return the resource that defines the source location where the artifacts are located along with {@link Response}
+ * on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(
@@ -234,20 +233,14 @@ private Mono> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the resource that defines the source location where the artifacts are located.
+ * @return the resource that defines the source location where the artifacts are located on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
String resourceGroupName, String artifactSourceName, ArtifactSourceInner artifactSourceInfo) {
return createOrUpdateWithResponseAsync(resourceGroupName, artifactSourceName, artifactSourceInfo)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -258,20 +251,14 @@ private Mono createOrUpdateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the resource that defines the source location where the artifacts are located.
+ * @return the resource that defines the source location where the artifacts are located on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(String resourceGroupName, String artifactSourceName) {
final ArtifactSourceInner artifactSourceInfo = null;
return createOrUpdateWithResponseAsync(resourceGroupName, artifactSourceName, artifactSourceInfo)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -300,7 +287,8 @@ public ArtifactSourceInner createOrUpdate(String resourceGroupName, String artif
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the resource that defines the source location where the artifacts are located.
+ * @return the resource that defines the source location where the artifacts are located along with {@link
+ * Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createOrUpdateWithResponse(
@@ -317,7 +305,7 @@ public Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an artifact source.
+ * @return an artifact source along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -367,7 +355,7 @@ private Mono> getByResourceGroupWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an artifact source.
+ * @return an artifact source along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -413,19 +401,12 @@ private Mono> getByResourceGroupWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an artifact source.
+ * @return an artifact source on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(String resourceGroupName, String artifactSourceName) {
return getByResourceGroupWithResponseAsync(resourceGroupName, artifactSourceName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -452,7 +433,7 @@ public ArtifactSourceInner getByResourceGroup(String resourceGroupName, String a
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an artifact source.
+ * @return an artifact source along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByResourceGroupWithResponse(
@@ -468,7 +449,7 @@ public Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(String resourceGroupName, String artifactSourceName) {
@@ -517,7 +498,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(
@@ -563,12 +544,11 @@ private Mono> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String artifactSourceName) {
- return deleteWithResponseAsync(resourceGroupName, artifactSourceName)
- .flatMap((Response res) -> Mono.empty());
+ return deleteWithResponseAsync(resourceGroupName, artifactSourceName).flatMap(ignored -> Mono.empty());
}
/**
@@ -594,7 +574,7 @@ public void delete(String resourceGroupName, String artifactSourceName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteWithResponse(String resourceGroupName, String artifactSourceName, Context context) {
@@ -608,7 +588,7 @@ public Response deleteWithResponse(String resourceGroupName, String artifa
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of artifact sources.
+ * @return the list of artifact sources along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> listWithResponseAsync(String resourceGroupName) {
@@ -651,7 +631,7 @@ private Mono>> listWithResponseAsync(String r
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of artifact sources.
+ * @return the list of artifact sources along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> listWithResponseAsync(String resourceGroupName, Context context) {
@@ -690,19 +670,11 @@ private Mono>> listWithResponseAsync(String r
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of artifact sources.
+ * @return the list of artifact sources on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listAsync(String resourceGroupName) {
- return listWithResponseAsync(resourceGroupName)
- .flatMap(
- (Response> res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ return listWithResponseAsync(resourceGroupName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -727,7 +699,7 @@ public List list(String resourceGroupName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of artifact sources.
+ * @return the list of artifact sources along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response> listWithResponse(String resourceGroupName, Context context) {
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 3263cb1ee83a7..c9876745d52c9 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
@@ -12,13 +12,12 @@
import com.azure.resourcemanager.deploymentmanager.fluent.models.ArtifactSourceInner;
import com.azure.resourcemanager.deploymentmanager.models.ArtifactSource;
import com.azure.resourcemanager.deploymentmanager.models.ArtifactSources;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
public final class ArtifactSourcesImpl implements ArtifactSources {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ArtifactSourcesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(ArtifactSourcesImpl.class);
private final ArtifactSourcesClient innerClient;
@@ -97,7 +96,7 @@ public Response> listWithResponse(String resourceGroupName,
public ArtifactSource getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -105,7 +104,7 @@ public ArtifactSource getById(String id) {
}
String artifactSourceName = Utils.getValueFromIdByName(id, "artifactSources");
if (artifactSourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -117,7 +116,7 @@ public ArtifactSource getById(String id) {
public Response getByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -125,7 +124,7 @@ public Response getByIdWithResponse(String id, Context context)
}
String artifactSourceName = Utils.getValueFromIdByName(id, "artifactSources");
if (artifactSourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -137,7 +136,7 @@ public Response getByIdWithResponse(String id, Context context)
public void deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -145,19 +144,19 @@ public void deleteById(String id) {
}
String artifactSourceName = Utils.getValueFromIdByName(id, "artifactSources");
if (artifactSourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
.format("The resource ID '%s' is not valid. Missing path segment 'artifactSources'.", id)));
}
- this.deleteWithResponse(resourceGroupName, artifactSourceName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroupName, artifactSourceName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -165,7 +164,7 @@ public Response deleteByIdWithResponse(String id, Context context) {
}
String artifactSourceName = Utils.getValueFromIdByName(id, "artifactSources");
if (artifactSourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/AzureDeploymentManagerBuilder.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/AzureDeploymentManagerBuilder.java
index 749309f9da1f9..bc95d59b2826c 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/AzureDeploymentManagerBuilder.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/AzureDeploymentManagerBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -70,34 +69,34 @@ public AzureDeploymentManagerBuilder environment(AzureEnvironment environment) {
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the AzureDeploymentManagerBuilder.
*/
- public AzureDeploymentManagerBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public AzureDeploymentManagerBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the AzureDeploymentManagerBuilder.
*/
- public AzureDeploymentManagerBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public AzureDeploymentManagerBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -129,15 +128,12 @@ public AzureDeploymentManagerImpl buildClient() {
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/AzureDeploymentManagerImpl.java b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/AzureDeploymentManagerImpl.java
index e4f27d4c4ae53..d865282b33dca 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/AzureDeploymentManagerImpl.java
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/AzureDeploymentManagerImpl.java
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -35,15 +36,12 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the AzureDeploymentManagerImpl type. */
@ServiceClient(builder = AzureDeploymentManagerBuilder.class)
public final class AzureDeploymentManagerImpl implements AzureDeploymentManager {
- private final ClientLogger logger = new ClientLogger(AzureDeploymentManagerImpl.class);
-
/**
* Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of
* the URI for every service call.
@@ -253,10 +251,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry