diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/pom.xml b/sdk/digitaltwins/mgmt-v2020_10_31/pom.xml
new file mode 100644
index 0000000000000..767d73e8bf0c1
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/pom.xml
@@ -0,0 +1,135 @@
+
+
+ 4.0.0
+ com.microsoft.azure.digitaltwins.v2020_10_31
+
+ com.microsoft.azure
+ azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
+
+ azure-mgmt-digitaltwins
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for DigitalTwins Management
+ This package contains Microsoft DigitalTwins Management SDK.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+ UTF-8
+
+
+
+
+ microsoft
+ Microsoft
+
+
+
+
+ com.microsoft.azure
+ azure-client-runtime
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+
+
+ junit
+ junit
+ test
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ test
+
+
+ com.microsoft.azure
+ azure-mgmt-resources
+ test
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+ test-jar
+ test
+
+ 1.6.5
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ true
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+
+ 1.7
+
+
+ com.microsoft.azure.management.apigeneration.LangDefinitionProcessor
+
+
+ true
+ true
+
+ true
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8
+
+ *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
+
+
+ /**
+
* Copyright (c) Microsoft Corporation. All rights reserved.
+
* Licensed under the MIT License. See License.txt in the project root for
+
* license information.
+
*/
+ ]]>
+
+
+
+
+
+
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/CheckNameRequest.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/CheckNameRequest.java
new file mode 100644
index 0000000000000..dd5c0931e5c8e
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/CheckNameRequest.java
@@ -0,0 +1,78 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The result returned from a database check name availability request.
+ */
+public class CheckNameRequest {
+ /**
+ * Resource name.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The type of resource, for instance
+ * Microsoft.DigitalTwins/digitalTwinsInstances.
+ */
+ @JsonProperty(value = "type", required = true)
+ private String type;
+
+ /**
+ * Creates an instance of CheckNameRequest class.
+ * @param name resource name.
+ */
+ public CheckNameRequest() {
+ type = "Microsoft.DigitalTwins/digitalTwinsInstances";
+ }
+
+ /**
+ * Get resource name.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set resource name.
+ *
+ * @param name the name value to set
+ * @return the CheckNameRequest object itself.
+ */
+ public CheckNameRequest withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the type of resource, for instance Microsoft.DigitalTwins/digitalTwinsInstances.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type of resource, for instance Microsoft.DigitalTwins/digitalTwinsInstances.
+ *
+ * @param type the type value to set
+ * @return the CheckNameRequest object itself.
+ */
+ public CheckNameRequest withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/CheckNameResult.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/CheckNameResult.java
new file mode 100644
index 0000000000000..aa2d8c7506d1f
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/CheckNameResult.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation.DigitalTwinsManager;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation.CheckNameResultInner;
+
+/**
+ * Type representing CheckNameResult.
+ */
+public interface CheckNameResult extends HasInner, HasManager {
+ /**
+ * @return the message value.
+ */
+ String message();
+
+ /**
+ * @return the nameAvailable value.
+ */
+ Boolean nameAvailable();
+
+ /**
+ * @return the reason value.
+ */
+ Reason reason();
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwins.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwins.java
new file mode 100644
index 0000000000000..46d4bb912c15c
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwins.java
@@ -0,0 +1,73 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import rx.Observable;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsDescription;
+import rx.Completable;
+
+/**
+ * Type representing DigitalTwins.
+ */
+public interface DigitalTwins {
+ /**
+ * Begins definition for a new DigitalTwinsInstance resource.
+ * @param name resource name.
+ * @return the first stage of the new DigitalTwinsInstance definition.
+ */
+ DigitalTwinsDescription.DefinitionStages.Blank defineDigitalTwinsInstance(String name);
+
+ /**
+ * Get DigitalTwinsInstances resource.
+ *
+ * @param resourceGroupName resource group name
+ * @param name resource name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getByResourceGroupAsync(String resourceGroupName, String name);
+
+ /**
+ * Get all the DigitalTwinsInstances in a resource group.
+ *
+ * @param resourceGroupName resource group name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceGroupAsync(String resourceGroupName);
+
+ /**
+ * Get all the DigitalTwinsInstances in a subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+ /**
+ * Delete a DigitalTwinsInstance.
+ *
+ * @param resourceGroupName resource group name
+ * @param name resource name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String name);
+
+ /**
+ * Check if a DigitalTwinsInstance name is available.
+ *
+ * @param location Location of DigitalTwinsInstance.
+ * @param name Resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable checkNameAvailabilityAsync(String location, String name);
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsDescription.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsDescription.java
new file mode 100644
index 0000000000000..b0f46ec7c8878
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsDescription.java
@@ -0,0 +1,89 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.Resource;
+import com.microsoft.azure.arm.resources.models.GroupableResourceCore;
+import com.microsoft.azure.arm.resources.models.HasResourceGroup;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation.DigitalTwinsManager;
+import org.joda.time.DateTime;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation.DigitalTwinsDescriptionInner;
+
+/**
+ * Type representing DigitalTwinsDescription.
+ */
+public interface DigitalTwinsDescription extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+ /**
+ * @return the createdTime value.
+ */
+ DateTime createdTime();
+
+ /**
+ * @return the hostName value.
+ */
+ String hostName();
+
+ /**
+ * @return the lastUpdatedTime value.
+ */
+ DateTime lastUpdatedTime();
+
+ /**
+ * @return the provisioningState value.
+ */
+ ProvisioningState provisioningState();
+
+ /**
+ * The entirety of the DigitalTwinsDescription definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of DigitalTwinsDescription definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a DigitalTwinsDescription definition.
+ */
+ interface Blank extends GroupableResourceCore.DefinitionWithRegion {
+ }
+
+ /**
+ * The stage of the DigitalTwinsDescription definition allowing to specify the resource group.
+ */
+ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, Resource.DefinitionWithTags {
+ }
+ }
+ /**
+ * The template for a DigitalTwinsDescription update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags {
+ }
+
+ /**
+ * Grouping of DigitalTwinsDescription update stages.
+ */
+ interface UpdateStages {
+ }
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsEndpointResource.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsEndpointResource.java
new file mode 100644
index 0000000000000..fff20a5ac62d2
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsEndpointResource.java
@@ -0,0 +1,118 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation.DigitalTwinsEndpointResourceInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation.DigitalTwinsManager;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing DigitalTwinsEndpointResource.
+ */
+public interface DigitalTwinsEndpointResource extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the properties value.
+ */
+ DigitalTwinsEndpointResourceProperties properties();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the DigitalTwinsEndpointResource definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithDigitalTwinsInstance, DefinitionStages.WithProperties, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of DigitalTwinsEndpointResource definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a DigitalTwinsEndpointResource definition.
+ */
+ interface Blank extends WithDigitalTwinsInstance {
+ }
+
+ /**
+ * The stage of the digitaltwinsendpointresource definition allowing to specify DigitalTwinsInstance.
+ */
+ interface WithDigitalTwinsInstance {
+ /**
+ * Specifies resourceGroupName, resourceName.
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance
+ * @param resourceName The name of the DigitalTwinsInstance
+ * @return the next definition stage
+ */
+ WithProperties withExistingDigitalTwinsInstance(String resourceGroupName, String resourceName);
+ }
+
+ /**
+ * The stage of the digitaltwinsendpointresource definition allowing to specify Properties.
+ */
+ interface WithProperties {
+ /**
+ * Specifies properties.
+ * @param properties DigitalTwinsInstance endpoint resource properties
+ * @return the next definition stage
+ */
+ WithCreate withProperties(DigitalTwinsEndpointResourceProperties properties);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable {
+ }
+ }
+ /**
+ * The template for a DigitalTwinsEndpointResource update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithProperties {
+ }
+
+ /**
+ * Grouping of DigitalTwinsEndpointResource update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the digitaltwinsendpointresource update allowing to specify Properties.
+ */
+ interface WithProperties {
+ /**
+ * Specifies properties.
+ * @param properties DigitalTwinsInstance endpoint resource properties
+ * @return the next update stage
+ */
+ Update withProperties(DigitalTwinsEndpointResourceProperties properties);
+ }
+
+ }
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsEndpointResourceProperties.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsEndpointResourceProperties.java
new file mode 100644
index 0000000000000..716c0a3972500
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsEndpointResourceProperties.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+
+/**
+ * Properties related to Digital Twins Endpoint.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = DigitalTwinsEndpointResourceProperties.class)
+@JsonTypeName("DigitalTwinsEndpointResourceProperties")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "ServiceBus", value = ServiceBus.class),
+ @JsonSubTypes.Type(name = "EventHub", value = EventHub.class),
+ @JsonSubTypes.Type(name = "EventGrid", value = EventGrid.class)
+})
+public class DigitalTwinsEndpointResourceProperties {
+ /**
+ * The provisioning state. Possible values include: 'Provisioning',
+ * 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'Warning',
+ * 'Suspending', 'Restoring', 'Moving', 'Disabled'.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private EndpointProvisioningState provisioningState;
+
+ /**
+ * Time when the Endpoint was added to DigitalTwinsInstance.
+ */
+ @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime createdTime;
+
+ /**
+ * Dead letter storage secret. Will be obfuscated during read.
+ */
+ @JsonProperty(value = "deadLetterSecret")
+ private String deadLetterSecret;
+
+ /**
+ * Get the provisioning state. Possible values include: 'Provisioning', 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'Warning', 'Suspending', 'Restoring', 'Moving', 'Disabled'.
+ *
+ * @return the provisioningState value
+ */
+ public EndpointProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get time when the Endpoint was added to DigitalTwinsInstance.
+ *
+ * @return the createdTime value
+ */
+ public DateTime createdTime() {
+ return this.createdTime;
+ }
+
+ /**
+ * Get dead letter storage secret. Will be obfuscated during read.
+ *
+ * @return the deadLetterSecret value
+ */
+ public String deadLetterSecret() {
+ return this.deadLetterSecret;
+ }
+
+ /**
+ * Set dead letter storage secret. Will be obfuscated during read.
+ *
+ * @param deadLetterSecret the deadLetterSecret value to set
+ * @return the DigitalTwinsEndpointResourceProperties object itself.
+ */
+ public DigitalTwinsEndpointResourceProperties withDeadLetterSecret(String deadLetterSecret) {
+ this.deadLetterSecret = deadLetterSecret;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsEndpoints.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsEndpoints.java
new file mode 100644
index 0000000000000..43e4b48736e5c
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsEndpoints.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation.DigitalTwinsEndpointsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing DigitalTwinsEndpoints.
+ */
+public interface DigitalTwinsEndpoints extends SupportsCreating, HasInner {
+ /**
+ * Get DigitalTwinsInstances Endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String resourceName, String endpointName);
+
+ /**
+ * Get DigitalTwinsInstance Endpoints.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync(final String resourceGroupName, final String resourceName);
+
+ /**
+ * Delete a DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String resourceName, String endpointName);
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsPatchDescription.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsPatchDescription.java
new file mode 100644
index 0000000000000..c989f0c53b637
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsPatchDescription.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The description of the DigitalTwins service.
+ */
+public class DigitalTwinsPatchDescription {
+ /**
+ * Instance tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get instance tags.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set instance tags.
+ *
+ * @param tags the tags value to set
+ * @return the DigitalTwinsPatchDescription object itself.
+ */
+ public DigitalTwinsPatchDescription withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsResource.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsResource.java
new file mode 100644
index 0000000000000..17305760d3b5c
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/DigitalTwinsResource.java
@@ -0,0 +1,17 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.microsoft.azure.Resource;
+
+/**
+ * The common properties of a DigitalTwinsInstance.
+ */
+public class DigitalTwinsResource extends Resource {
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/EndpointProvisioningState.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/EndpointProvisioningState.java
new file mode 100644
index 0000000000000..ed99d9d381738
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/EndpointProvisioningState.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for EndpointProvisioningState.
+ */
+public final class EndpointProvisioningState extends ExpandableStringEnum {
+ /** Static value Provisioning for EndpointProvisioningState. */
+ public static final EndpointProvisioningState PROVISIONING = fromString("Provisioning");
+
+ /** Static value Deleting for EndpointProvisioningState. */
+ public static final EndpointProvisioningState DELETING = fromString("Deleting");
+
+ /** Static value Succeeded for EndpointProvisioningState. */
+ public static final EndpointProvisioningState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Failed for EndpointProvisioningState. */
+ public static final EndpointProvisioningState FAILED = fromString("Failed");
+
+ /** Static value Canceled for EndpointProvisioningState. */
+ public static final EndpointProvisioningState CANCELED = fromString("Canceled");
+
+ /** Static value Deleted for EndpointProvisioningState. */
+ public static final EndpointProvisioningState DELETED = fromString("Deleted");
+
+ /** Static value Warning for EndpointProvisioningState. */
+ public static final EndpointProvisioningState WARNING = fromString("Warning");
+
+ /** Static value Suspending for EndpointProvisioningState. */
+ public static final EndpointProvisioningState SUSPENDING = fromString("Suspending");
+
+ /** Static value Restoring for EndpointProvisioningState. */
+ public static final EndpointProvisioningState RESTORING = fromString("Restoring");
+
+ /** Static value Moving for EndpointProvisioningState. */
+ public static final EndpointProvisioningState MOVING = fromString("Moving");
+
+ /** Static value Disabled for EndpointProvisioningState. */
+ public static final EndpointProvisioningState DISABLED = fromString("Disabled");
+
+ /**
+ * Creates or finds a EndpointProvisioningState from its string representation.
+ * @param name a name to look for
+ * @return the corresponding EndpointProvisioningState
+ */
+ @JsonCreator
+ public static EndpointProvisioningState fromString(String name) {
+ return fromString(name, EndpointProvisioningState.class);
+ }
+
+ /**
+ * @return known EndpointProvisioningState values
+ */
+ public static Collection values() {
+ return values(EndpointProvisioningState.class);
+ }
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ErrorDefinition.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ErrorDefinition.java
new file mode 100644
index 0000000000000..c3e7c57561bf6
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ErrorDefinition.java
@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error definition.
+ */
+public class ErrorDefinition {
+ /**
+ * Service specific error code which serves as the substatus for the HTTP
+ * error code.
+ */
+ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
+ private String code;
+
+ /**
+ * Description of the error.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * Internal error details.
+ */
+ @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY)
+ private List details;
+
+ /**
+ * Get service specific error code which serves as the substatus for the HTTP error code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Get description of the error.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Get internal error details.
+ *
+ * @return the details value
+ */
+ public List details() {
+ return this.details;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ErrorResponse.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ErrorResponse.java
new file mode 100644
index 0000000000000..ee9b8b8fc5a18
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ErrorResponse.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error response.
+ */
+public class ErrorResponse {
+ /**
+ * Error description.
+ */
+ @JsonProperty(value = "error")
+ private ErrorDefinition error;
+
+ /**
+ * Get error description.
+ *
+ * @return the error value
+ */
+ public ErrorDefinition error() {
+ return this.error;
+ }
+
+ /**
+ * Set error description.
+ *
+ * @param error the error value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withError(ErrorDefinition error) {
+ this.error = error;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ErrorResponseException.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ErrorResponseException.java
new file mode 100644
index 0000000000000..28f62f66f4e27
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ErrorResponseException.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.microsoft.rest.RestException;
+import okhttp3.ResponseBody;
+import retrofit2.Response;
+
+/**
+ * Exception thrown for an invalid response with ErrorResponse information.
+ */
+public class ErrorResponseException extends RestException {
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public ErrorResponseException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ * @param body the deserialized response body
+ */
+ public ErrorResponseException(final String message, final Response response, final ErrorResponse body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public ErrorResponse body() {
+ return (ErrorResponse) super.body();
+ }
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/EventGrid.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/EventGrid.java
new file mode 100644
index 0000000000000..48a147b4e40d1
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/EventGrid.java
@@ -0,0 +1,99 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/**
+ * Properties related to EventGrid.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = EventGrid.class)
+@JsonTypeName("EventGrid")
+public class EventGrid extends DigitalTwinsEndpointResourceProperties {
+ /**
+ * EventGrid Topic Endpoint.
+ */
+ @JsonProperty(value = "TopicEndpoint", required = true)
+ private String topicEndpoint;
+
+ /**
+ * EventGrid secondary accesskey. Will be obfuscated during read.
+ */
+ @JsonProperty(value = "accessKey1", required = true)
+ private String accessKey1;
+
+ /**
+ * EventGrid secondary accesskey. Will be obfuscated during read.
+ */
+ @JsonProperty(value = "accessKey2")
+ private String accessKey2;
+
+ /**
+ * Get eventGrid Topic Endpoint.
+ *
+ * @return the topicEndpoint value
+ */
+ public String topicEndpoint() {
+ return this.topicEndpoint;
+ }
+
+ /**
+ * Set eventGrid Topic Endpoint.
+ *
+ * @param topicEndpoint the topicEndpoint value to set
+ * @return the EventGrid object itself.
+ */
+ public EventGrid withTopicEndpoint(String topicEndpoint) {
+ this.topicEndpoint = topicEndpoint;
+ return this;
+ }
+
+ /**
+ * Get eventGrid secondary accesskey. Will be obfuscated during read.
+ *
+ * @return the accessKey1 value
+ */
+ public String accessKey1() {
+ return this.accessKey1;
+ }
+
+ /**
+ * Set eventGrid secondary accesskey. Will be obfuscated during read.
+ *
+ * @param accessKey1 the accessKey1 value to set
+ * @return the EventGrid object itself.
+ */
+ public EventGrid withAccessKey1(String accessKey1) {
+ this.accessKey1 = accessKey1;
+ return this;
+ }
+
+ /**
+ * Get eventGrid secondary accesskey. Will be obfuscated during read.
+ *
+ * @return the accessKey2 value
+ */
+ public String accessKey2() {
+ return this.accessKey2;
+ }
+
+ /**
+ * Set eventGrid secondary accesskey. Will be obfuscated during read.
+ *
+ * @param accessKey2 the accessKey2 value to set
+ * @return the EventGrid object itself.
+ */
+ public EventGrid withAccessKey2(String accessKey2) {
+ this.accessKey2 = accessKey2;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/EventHub.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/EventHub.java
new file mode 100644
index 0000000000000..57e24beae91a5
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/EventHub.java
@@ -0,0 +1,74 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/**
+ * Properties related to EventHub.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = EventHub.class)
+@JsonTypeName("EventHub")
+public class EventHub extends DigitalTwinsEndpointResourceProperties {
+ /**
+ * PrimaryConnectionString of the endpoint. Will be obfuscated during read.
+ */
+ @JsonProperty(value = "connectionStringPrimaryKey", required = true)
+ private String connectionStringPrimaryKey;
+
+ /**
+ * SecondaryConnectionString of the endpoint. Will be obfuscated during
+ * read.
+ */
+ @JsonProperty(value = "connectionStringSecondaryKey")
+ private String connectionStringSecondaryKey;
+
+ /**
+ * Get primaryConnectionString of the endpoint. Will be obfuscated during read.
+ *
+ * @return the connectionStringPrimaryKey value
+ */
+ public String connectionStringPrimaryKey() {
+ return this.connectionStringPrimaryKey;
+ }
+
+ /**
+ * Set primaryConnectionString of the endpoint. Will be obfuscated during read.
+ *
+ * @param connectionStringPrimaryKey the connectionStringPrimaryKey value to set
+ * @return the EventHub object itself.
+ */
+ public EventHub withConnectionStringPrimaryKey(String connectionStringPrimaryKey) {
+ this.connectionStringPrimaryKey = connectionStringPrimaryKey;
+ return this;
+ }
+
+ /**
+ * Get secondaryConnectionString of the endpoint. Will be obfuscated during read.
+ *
+ * @return the connectionStringSecondaryKey value
+ */
+ public String connectionStringSecondaryKey() {
+ return this.connectionStringSecondaryKey;
+ }
+
+ /**
+ * Set secondaryConnectionString of the endpoint. Will be obfuscated during read.
+ *
+ * @param connectionStringSecondaryKey the connectionStringSecondaryKey value to set
+ * @return the EventHub object itself.
+ */
+ public EventHub withConnectionStringSecondaryKey(String connectionStringSecondaryKey) {
+ this.connectionStringSecondaryKey = connectionStringSecondaryKey;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ExternalResource.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ExternalResource.java
new file mode 100644
index 0000000000000..f0c1148506e7f
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ExternalResource.java
@@ -0,0 +1,17 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * Definition of a resource.
+ */
+public class ExternalResource extends ProxyResource {
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/Operation.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/Operation.java
new file mode 100644
index 0000000000000..1a09590538ed9
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/Operation.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation.DigitalTwinsManager;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation.OperationInner;
+
+/**
+ * Type representing Operation.
+ */
+public interface Operation extends HasInner, HasManager {
+ /**
+ * @return the display value.
+ */
+ OperationDisplay display();
+
+ /**
+ * @return the isDataAction value.
+ */
+ Boolean isDataAction();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the origin value.
+ */
+ String origin();
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/OperationDisplay.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/OperationDisplay.java
new file mode 100644
index 0000000000000..d9f0af14d8dcc
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/OperationDisplay.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The object that represents the operation.
+ */
+public class OperationDisplay {
+ /**
+ * Service provider: Microsoft DigitalTwins.
+ */
+ @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY)
+ private String provider;
+
+ /**
+ * Resource Type: DigitalTwinsInstances.
+ */
+ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY)
+ private String resource;
+
+ /**
+ * Name of the operation.
+ */
+ @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY)
+ private String operation;
+
+ /**
+ * Friendly description for the operation,.
+ */
+ @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /**
+ * Get service provider: Microsoft DigitalTwins.
+ *
+ * @return the provider value
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Get resource Type: DigitalTwinsInstances.
+ *
+ * @return the resource value
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Get name of the operation.
+ *
+ * @return the operation value
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+ /**
+ * Get friendly description for the operation,.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/Operations.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/Operations.java
new file mode 100644
index 0000000000000..b9f3827747e52
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/Operations.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import rx.Observable;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation.OperationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Operations.
+ */
+public interface Operations extends HasInner {
+ /**
+ * Lists all of the available DigitalTwins service REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ProvisioningState.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ProvisioningState.java
new file mode 100644
index 0000000000000..384130e61e824
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ProvisioningState.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ProvisioningState.
+ */
+public final class ProvisioningState extends ExpandableStringEnum {
+ /** Static value Provisioning for ProvisioningState. */
+ public static final ProvisioningState PROVISIONING = fromString("Provisioning");
+
+ /** Static value Deleting for ProvisioningState. */
+ public static final ProvisioningState DELETING = fromString("Deleting");
+
+ /** Static value Succeeded for ProvisioningState. */
+ public static final ProvisioningState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Failed for ProvisioningState. */
+ public static final ProvisioningState FAILED = fromString("Failed");
+
+ /** Static value Canceled for ProvisioningState. */
+ public static final ProvisioningState CANCELED = fromString("Canceled");
+
+ /** Static value Deleted for ProvisioningState. */
+ public static final ProvisioningState DELETED = fromString("Deleted");
+
+ /** Static value Warning for ProvisioningState. */
+ public static final ProvisioningState WARNING = fromString("Warning");
+
+ /** Static value Suspending for ProvisioningState. */
+ public static final ProvisioningState SUSPENDING = fromString("Suspending");
+
+ /** Static value Restoring for ProvisioningState. */
+ public static final ProvisioningState RESTORING = fromString("Restoring");
+
+ /** Static value Moving for ProvisioningState. */
+ public static final ProvisioningState MOVING = fromString("Moving");
+
+ /**
+ * Creates or finds a ProvisioningState from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ProvisioningState
+ */
+ @JsonCreator
+ public static ProvisioningState fromString(String name) {
+ return fromString(name, ProvisioningState.class);
+ }
+
+ /**
+ * @return known ProvisioningState values
+ */
+ public static Collection values() {
+ return values(ProvisioningState.class);
+ }
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/Reason.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/Reason.java
new file mode 100644
index 0000000000000..929d16362e6cf
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/Reason.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for Reason.
+ */
+public final class Reason extends ExpandableStringEnum {
+ /** Static value Invalid for Reason. */
+ public static final Reason INVALID = fromString("Invalid");
+
+ /** Static value AlreadyExists for Reason. */
+ public static final Reason ALREADY_EXISTS = fromString("AlreadyExists");
+
+ /**
+ * Creates or finds a Reason from its string representation.
+ * @param name a name to look for
+ * @return the corresponding Reason
+ */
+ @JsonCreator
+ public static Reason fromString(String name) {
+ return fromString(name, Reason.class);
+ }
+
+ /**
+ * @return known Reason values
+ */
+ public static Collection values() {
+ return values(Reason.class);
+ }
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ServiceBus.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ServiceBus.java
new file mode 100644
index 0000000000000..9697bf88c6171
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/ServiceBus.java
@@ -0,0 +1,74 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/**
+ * Properties related to ServiceBus.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = ServiceBus.class)
+@JsonTypeName("ServiceBus")
+public class ServiceBus extends DigitalTwinsEndpointResourceProperties {
+ /**
+ * PrimaryConnectionString of the endpoint. Will be obfuscated during read.
+ */
+ @JsonProperty(value = "primaryConnectionString", required = true)
+ private String primaryConnectionString;
+
+ /**
+ * SecondaryConnectionString of the endpoint. Will be obfuscated during
+ * read.
+ */
+ @JsonProperty(value = "secondaryConnectionString")
+ private String secondaryConnectionString;
+
+ /**
+ * Get primaryConnectionString of the endpoint. Will be obfuscated during read.
+ *
+ * @return the primaryConnectionString value
+ */
+ public String primaryConnectionString() {
+ return this.primaryConnectionString;
+ }
+
+ /**
+ * Set primaryConnectionString of the endpoint. Will be obfuscated during read.
+ *
+ * @param primaryConnectionString the primaryConnectionString value to set
+ * @return the ServiceBus object itself.
+ */
+ public ServiceBus withPrimaryConnectionString(String primaryConnectionString) {
+ this.primaryConnectionString = primaryConnectionString;
+ return this;
+ }
+
+ /**
+ * Get secondaryConnectionString of the endpoint. Will be obfuscated during read.
+ *
+ * @return the secondaryConnectionString value
+ */
+ public String secondaryConnectionString() {
+ return this.secondaryConnectionString;
+ }
+
+ /**
+ * Set secondaryConnectionString of the endpoint. Will be obfuscated during read.
+ *
+ * @param secondaryConnectionString the secondaryConnectionString value to set
+ * @return the ServiceBus object itself.
+ */
+ public ServiceBus withSecondaryConnectionString(String secondaryConnectionString) {
+ this.secondaryConnectionString = secondaryConnectionString;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/AzureDigitalTwinsManagementClientImpl.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/AzureDigitalTwinsManagementClientImpl.java
new file mode 100644
index 0000000000000..c09d37bdd90ea
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/AzureDigitalTwinsManagementClientImpl.java
@@ -0,0 +1,224 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation;
+
+import com.microsoft.azure.AzureClient;
+import com.microsoft.azure.AzureServiceClient;
+import com.microsoft.rest.credentials.ServiceClientCredentials;
+import com.microsoft.rest.RestClient;
+
+/**
+ * Initializes a new instance of the AzureDigitalTwinsManagementClientImpl class.
+ */
+public class AzureDigitalTwinsManagementClientImpl extends AzureServiceClient {
+ /** the {@link AzureClient} used for long running operations. */
+ private AzureClient azureClient;
+
+ /**
+ * Gets the {@link AzureClient} used for long running operations.
+ * @return the azure client;
+ */
+ public AzureClient getAzureClient() {
+ return this.azureClient;
+ }
+
+ /** The subscription identifier. */
+ private String subscriptionId;
+
+ /**
+ * Gets The subscription identifier.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Sets The subscription identifier.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the service client itself
+ */
+ public AzureDigitalTwinsManagementClientImpl withSubscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /** Version of the DigitalTwinsInstance Management API. */
+ private String apiVersion;
+
+ /**
+ * Gets Version of the DigitalTwinsInstance Management API.
+ *
+ * @return the apiVersion value.
+ */
+ public String apiVersion() {
+ return this.apiVersion;
+ }
+
+ /** The preferred language for the response. */
+ private String acceptLanguage;
+
+ /**
+ * Gets The preferred language for the response.
+ *
+ * @return the acceptLanguage value.
+ */
+ public String acceptLanguage() {
+ return this.acceptLanguage;
+ }
+
+ /**
+ * Sets The preferred language for the response.
+ *
+ * @param acceptLanguage the acceptLanguage value.
+ * @return the service client itself
+ */
+ public AzureDigitalTwinsManagementClientImpl withAcceptLanguage(String acceptLanguage) {
+ this.acceptLanguage = acceptLanguage;
+ return this;
+ }
+
+ /** The retry timeout in seconds for Long Running Operations. Default value is 30. */
+ private int longRunningOperationRetryTimeout;
+
+ /**
+ * Gets The retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @return the longRunningOperationRetryTimeout value.
+ */
+ public int longRunningOperationRetryTimeout() {
+ return this.longRunningOperationRetryTimeout;
+ }
+
+ /**
+ * Sets The retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
+ * @return the service client itself
+ */
+ public AzureDigitalTwinsManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) {
+ this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout;
+ return this;
+ }
+
+ /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */
+ private boolean generateClientRequestId;
+
+ /**
+ * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ *
+ * @return the generateClientRequestId value.
+ */
+ public boolean generateClientRequestId() {
+ return this.generateClientRequestId;
+ }
+
+ /**
+ * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ *
+ * @param generateClientRequestId the generateClientRequestId value.
+ * @return the service client itself
+ */
+ public AzureDigitalTwinsManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) {
+ this.generateClientRequestId = generateClientRequestId;
+ return this;
+ }
+
+ /**
+ * The DigitalTwinsInner object to access its operations.
+ */
+ private DigitalTwinsInner digitalTwins;
+
+ /**
+ * Gets the DigitalTwinsInner object to access its operations.
+ * @return the DigitalTwinsInner object.
+ */
+ public DigitalTwinsInner digitalTwins() {
+ return this.digitalTwins;
+ }
+
+ /**
+ * The DigitalTwinsEndpointsInner object to access its operations.
+ */
+ private DigitalTwinsEndpointsInner digitalTwinsEndpoints;
+
+ /**
+ * Gets the DigitalTwinsEndpointsInner object to access its operations.
+ * @return the DigitalTwinsEndpointsInner object.
+ */
+ public DigitalTwinsEndpointsInner digitalTwinsEndpoints() {
+ return this.digitalTwinsEndpoints;
+ }
+
+ /**
+ * The OperationsInner object to access its operations.
+ */
+ private OperationsInner operations;
+
+ /**
+ * Gets the OperationsInner object to access its operations.
+ * @return the OperationsInner object.
+ */
+ public OperationsInner operations() {
+ return this.operations;
+ }
+
+ /**
+ * Initializes an instance of AzureDigitalTwinsManagementClient client.
+ *
+ * @param credentials the management credentials for Azure
+ */
+ public AzureDigitalTwinsManagementClientImpl(ServiceClientCredentials credentials) {
+ this("https://management.azure.com", credentials);
+ }
+
+ /**
+ * Initializes an instance of AzureDigitalTwinsManagementClient client.
+ *
+ * @param baseUrl the base URL of the host
+ * @param credentials the management credentials for Azure
+ */
+ public AzureDigitalTwinsManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) {
+ super(baseUrl, credentials);
+ initialize();
+ }
+
+ /**
+ * Initializes an instance of AzureDigitalTwinsManagementClient client.
+ *
+ * @param restClient the REST client to connect to Azure.
+ */
+ public AzureDigitalTwinsManagementClientImpl(RestClient restClient) {
+ super(restClient);
+ initialize();
+ }
+
+ protected void initialize() {
+ this.apiVersion = "2020-10-31";
+ this.acceptLanguage = "en-US";
+ this.longRunningOperationRetryTimeout = 30;
+ this.generateClientRequestId = true;
+ this.digitalTwins = new DigitalTwinsInner(restClient().retrofit(), this);
+ this.digitalTwinsEndpoints = new DigitalTwinsEndpointsInner(restClient().retrofit(), this);
+ this.operations = new OperationsInner(restClient().retrofit(), this);
+ this.azureClient = new AzureClient(this);
+ }
+
+ /**
+ * Gets the User-Agent header for the client.
+ *
+ * @return the user agent string.
+ */
+ @Override
+ public String userAgent() {
+ return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "AzureDigitalTwinsManagementClient", "2020-10-31");
+ }
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/CheckNameResultImpl.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/CheckNameResultImpl.java
new file mode 100644
index 0000000000000..442870a676dc2
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/CheckNameResultImpl.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation;
+
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.CheckNameResult;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.Reason;
+
+class CheckNameResultImpl extends WrapperImpl implements CheckNameResult {
+ private final DigitalTwinsManager manager;
+ CheckNameResultImpl(CheckNameResultInner inner, DigitalTwinsManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public DigitalTwinsManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public String message() {
+ return this.inner().message();
+ }
+
+ @Override
+ public Boolean nameAvailable() {
+ return this.inner().nameAvailable();
+ }
+
+ @Override
+ public Reason reason() {
+ return this.inner().reason();
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/CheckNameResultInner.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/CheckNameResultInner.java
new file mode 100644
index 0000000000000..cab7b944224c7
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/CheckNameResultInner.java
@@ -0,0 +1,98 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation;
+
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.Reason;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The result returned from a check name availability request.
+ */
+public class CheckNameResultInner {
+ /**
+ * Specifies a Boolean value that indicates if the name is available.
+ */
+ @JsonProperty(value = "nameAvailable")
+ private Boolean nameAvailable;
+
+ /**
+ * Message indicating an unavailable name due to a conflict, or a
+ * description of the naming rules that are violated.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * Message providing the reason why the given name is invalid. Possible
+ * values include: 'Invalid', 'AlreadyExists'.
+ */
+ @JsonProperty(value = "reason")
+ private Reason reason;
+
+ /**
+ * Get specifies a Boolean value that indicates if the name is available.
+ *
+ * @return the nameAvailable value
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Set specifies a Boolean value that indicates if the name is available.
+ *
+ * @param nameAvailable the nameAvailable value to set
+ * @return the CheckNameResultInner object itself.
+ */
+ public CheckNameResultInner withNameAvailable(Boolean nameAvailable) {
+ this.nameAvailable = nameAvailable;
+ return this;
+ }
+
+ /**
+ * Get message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated.
+ *
+ * @param message the message value to set
+ * @return the CheckNameResultInner object itself.
+ */
+ public CheckNameResultInner withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get message providing the reason why the given name is invalid. Possible values include: 'Invalid', 'AlreadyExists'.
+ *
+ * @return the reason value
+ */
+ public Reason reason() {
+ return this.reason;
+ }
+
+ /**
+ * Set message providing the reason why the given name is invalid. Possible values include: 'Invalid', 'AlreadyExists'.
+ *
+ * @param reason the reason value to set
+ * @return the CheckNameResultInner object itself.
+ */
+ public CheckNameResultInner withReason(Reason reason) {
+ this.reason = reason;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsDescriptionImpl.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsDescriptionImpl.java
new file mode 100644
index 0000000000000..bf361f5804ead
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsDescriptionImpl.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation;
+
+import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsDescription;
+import rx.Observable;
+import org.joda.time.DateTime;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.ProvisioningState;
+
+class DigitalTwinsDescriptionImpl extends GroupableResourceCoreImpl implements DigitalTwinsDescription, DigitalTwinsDescription.Definition, DigitalTwinsDescription.Update {
+ DigitalTwinsDescriptionImpl(String name, DigitalTwinsDescriptionInner inner, DigitalTwinsManager manager) {
+ super(name, inner, manager);
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ DigitalTwinsInner client = this.manager().inner().digitalTwins();
+ return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ DigitalTwinsInner client = this.manager().inner().digitalTwins();
+ return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ DigitalTwinsInner client = this.manager().inner().digitalTwins();
+ return client.getByResourceGroupAsync(this.resourceGroupName(), this.name());
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+
+ @Override
+ public DateTime createdTime() {
+ return this.inner().createdTime();
+ }
+
+ @Override
+ public String hostName() {
+ return this.inner().hostName();
+ }
+
+ @Override
+ public DateTime lastUpdatedTime() {
+ return this.inner().lastUpdatedTime();
+ }
+
+ @Override
+ public ProvisioningState provisioningState() {
+ return this.inner().provisioningState();
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsDescriptionInner.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsDescriptionInner.java
new file mode 100644
index 0000000000000..68865bdeca713
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsDescriptionInner.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation;
+
+import org.joda.time.DateTime;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsResource;
+
+/**
+ * The description of the DigitalTwins service.
+ */
+@JsonFlatten
+public class DigitalTwinsDescriptionInner extends DigitalTwinsResource {
+ /**
+ * Time when DigitalTwinsInstance was created.
+ */
+ @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime createdTime;
+
+ /**
+ * Time when DigitalTwinsInstance was updated.
+ */
+ @JsonProperty(value = "properties.lastUpdatedTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime lastUpdatedTime;
+
+ /**
+ * The provisioning state. Possible values include: 'Provisioning',
+ * 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'Warning',
+ * 'Suspending', 'Restoring', 'Moving'.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Api endpoint to work with DigitalTwinsInstance.
+ */
+ @JsonProperty(value = "properties.hostName", access = JsonProperty.Access.WRITE_ONLY)
+ private String hostName;
+
+ /**
+ * Get time when DigitalTwinsInstance was created.
+ *
+ * @return the createdTime value
+ */
+ public DateTime createdTime() {
+ return this.createdTime;
+ }
+
+ /**
+ * Get time when DigitalTwinsInstance was updated.
+ *
+ * @return the lastUpdatedTime value
+ */
+ public DateTime lastUpdatedTime() {
+ return this.lastUpdatedTime;
+ }
+
+ /**
+ * Get the provisioning state. Possible values include: 'Provisioning', 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'Warning', 'Suspending', 'Restoring', 'Moving'.
+ *
+ * @return the provisioningState value
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get api endpoint to work with DigitalTwinsInstance.
+ *
+ * @return the hostName value
+ */
+ public String hostName() {
+ return this.hostName;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsEndpointResourceImpl.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsEndpointResourceImpl.java
new file mode 100644
index 0000000000000..e242ec63c2f8c
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsEndpointResourceImpl.java
@@ -0,0 +1,136 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation;
+
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsEndpointResource;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsEndpointResourceProperties;
+import org.joda.time.DateTime;
+import rx.functions.Func1;
+
+class DigitalTwinsEndpointResourceImpl extends CreatableUpdatableImpl implements DigitalTwinsEndpointResource, DigitalTwinsEndpointResource.Definition, DigitalTwinsEndpointResource.Update {
+ private final DigitalTwinsManager manager;
+ private String resourceGroupName;
+ private String resourceName;
+ private String endpointName;
+ private DigitalTwinsEndpointResourceProperties cproperties;
+ private DigitalTwinsEndpointResourceProperties uproperties;
+
+ DigitalTwinsEndpointResourceImpl(String name, DigitalTwinsManager manager) {
+ super(name, new DigitalTwinsEndpointResourceInner());
+ this.manager = manager;
+ // Set resource name
+ this.endpointName = name;
+ //
+ this.cproperties = new DigitalTwinsEndpointResourceProperties();
+ this.uproperties = new DigitalTwinsEndpointResourceProperties();
+ }
+
+ DigitalTwinsEndpointResourceImpl(DigitalTwinsEndpointResourceInner inner, DigitalTwinsManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.endpointName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.resourceName = IdParsingUtils.getValueFromIdByName(inner.id(), "digitalTwinsInstances");
+ this.endpointName = IdParsingUtils.getValueFromIdByName(inner.id(), "endpoints");
+ //
+ this.cproperties = new DigitalTwinsEndpointResourceProperties();
+ this.uproperties = new DigitalTwinsEndpointResourceProperties();
+ }
+
+ @Override
+ public DigitalTwinsManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ DigitalTwinsEndpointsInner client = this.manager().inner().digitalTwinsEndpoints();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.resourceName, this.endpointName, this.cproperties)
+ .map(new Func1() {
+ @Override
+ public DigitalTwinsEndpointResourceInner call(DigitalTwinsEndpointResourceInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ DigitalTwinsEndpointsInner client = this.manager().inner().digitalTwinsEndpoints();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.resourceName, this.endpointName, this.uproperties)
+ .map(new Func1() {
+ @Override
+ public DigitalTwinsEndpointResourceInner call(DigitalTwinsEndpointResourceInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ DigitalTwinsEndpointsInner client = this.manager().inner().digitalTwinsEndpoints();
+ return client.getAsync(this.resourceGroupName, this.resourceName, this.endpointName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+ private void resetCreateUpdateParameters() {
+ this.cproperties = new DigitalTwinsEndpointResourceProperties();
+ this.uproperties = new DigitalTwinsEndpointResourceProperties();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public DigitalTwinsEndpointResourceProperties properties() {
+ return this.inner().properties();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public DigitalTwinsEndpointResourceImpl withExistingDigitalTwinsInstance(String resourceGroupName, String resourceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ @Override
+ public DigitalTwinsEndpointResourceImpl withProperties(DigitalTwinsEndpointResourceProperties properties) {
+ if (isInCreateMode()) {
+ this.cproperties = properties;
+ } else {
+ this.uproperties = properties;
+ }
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsEndpointResourceInner.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsEndpointResourceInner.java
new file mode 100644
index 0000000000000..d54f825f433bf
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsEndpointResourceInner.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation;
+
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsEndpointResourceProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.ExternalResource;
+
+/**
+ * DigitalTwinsInstance endpoint resource.
+ */
+public class DigitalTwinsEndpointResourceInner extends ExternalResource {
+ /**
+ * DigitalTwinsInstance endpoint resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private DigitalTwinsEndpointResourceProperties properties;
+
+ /**
+ * Get digitalTwinsInstance endpoint resource properties.
+ *
+ * @return the properties value
+ */
+ public DigitalTwinsEndpointResourceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set digitalTwinsInstance endpoint resource properties.
+ *
+ * @param properties the properties value to set
+ * @return the DigitalTwinsEndpointResourceInner object itself.
+ */
+ public DigitalTwinsEndpointResourceInner withProperties(DigitalTwinsEndpointResourceProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsEndpointsImpl.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsEndpointsImpl.java
new file mode 100644
index 0000000000000..2e5d4f30cfcca
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsEndpointsImpl.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ *
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsEndpoints;
+import rx.Completable;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsEndpointResource;
+
+class DigitalTwinsEndpointsImpl extends WrapperImpl implements DigitalTwinsEndpoints {
+ private final DigitalTwinsManager manager;
+
+ DigitalTwinsEndpointsImpl(DigitalTwinsManager manager) {
+ super(manager.inner().digitalTwinsEndpoints());
+ this.manager = manager;
+ }
+
+ public DigitalTwinsManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public DigitalTwinsEndpointResourceImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private DigitalTwinsEndpointResourceImpl wrapModel(DigitalTwinsEndpointResourceInner inner) {
+ return new DigitalTwinsEndpointResourceImpl(inner, manager());
+ }
+
+ private DigitalTwinsEndpointResourceImpl wrapModel(String name) {
+ return new DigitalTwinsEndpointResourceImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable listAsync(final String resourceGroupName, final String resourceName) {
+ DigitalTwinsEndpointsInner client = this.inner();
+ return client.listAsync(resourceGroupName, resourceName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public DigitalTwinsEndpointResource call(DigitalTwinsEndpointResourceInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String resourceName, String endpointName) {
+ DigitalTwinsEndpointsInner client = this.inner();
+ return client.getAsync(resourceGroupName, resourceName, endpointName)
+ .flatMap(new Func1>() {
+ @Override
+ public Observable call(DigitalTwinsEndpointResourceInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((DigitalTwinsEndpointResource)wrapModel(inner));
+ }
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String resourceName, String endpointName) {
+ DigitalTwinsEndpointsInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, resourceName, endpointName).toCompletable();
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsEndpointsInner.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsEndpointsInner.java
new file mode 100644
index 0000000000000..650dcc171395c
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsEndpointsInner.java
@@ -0,0 +1,920 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsEndpointResourceProperties;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.ErrorResponseException;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.Path;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.http.Url;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in DigitalTwinsEndpoints.
+ */
+public class DigitalTwinsEndpointsInner {
+ /** The Retrofit service to perform REST calls. */
+ private DigitalTwinsEndpointsService service;
+ /** The service client containing this operation class. */
+ private AzureDigitalTwinsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DigitalTwinsEndpointsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public DigitalTwinsEndpointsInner(Retrofit retrofit, AzureDigitalTwinsManagementClientImpl client) {
+ this.service = retrofit.create(DigitalTwinsEndpointsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DigitalTwinsEndpoints to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface DigitalTwinsEndpointsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsEndpoints list" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints")
+ Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsEndpoints get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}")
+ Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("endpointName") String endpointName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsEndpoints createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}")
+ Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("endpointName") String endpointName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DigitalTwinsEndpointResourceInner endpointDescription, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsEndpoints beginCreateOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}")
+ Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("endpointName") String endpointName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DigitalTwinsEndpointResourceInner endpointDescription, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsEndpoints delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("endpointName") String endpointName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsEndpoints beginDelete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}", method = "DELETE", hasBody = true)
+ Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("endpointName") String endpointName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsEndpoints listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Get DigitalTwinsInstance Endpoints.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<DigitalTwinsEndpointResourceInner> object if successful.
+ */
+ public PagedList list(final String resourceGroupName, final String resourceName) {
+ ServiceResponse> response = listSinglePageAsync(resourceGroupName, resourceName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Get DigitalTwinsInstance Endpoints.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listAsync(final String resourceGroupName, final String resourceName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(resourceGroupName, resourceName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Get DigitalTwinsInstance Endpoints.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DigitalTwinsEndpointResourceInner> object
+ */
+ public Observable> listAsync(final String resourceGroupName, final String resourceName) {
+ return listWithServiceResponseAsync(resourceGroupName, resourceName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get DigitalTwinsInstance Endpoints.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DigitalTwinsEndpointResourceInner> object
+ */
+ public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String resourceName) {
+ return listSinglePageAsync(resourceGroupName, resourceName)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Get DigitalTwinsInstance Endpoints.
+ *
+ ServiceResponse> * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ ServiceResponse> * @param resourceName The name of the DigitalTwinsInstance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<DigitalTwinsEndpointResourceInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync(final String resourceGroupName, final String resourceName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ return service.list(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Get DigitalTwinsInstances Endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DigitalTwinsEndpointResourceInner object if successful.
+ */
+ public DigitalTwinsEndpointResourceInner get(String resourceGroupName, String resourceName, String endpointName) {
+ return getWithServiceResponseAsync(resourceGroupName, resourceName, endpointName).toBlocking().single().body();
+ }
+
+ /**
+ * Get DigitalTwinsInstances Endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getAsync(String resourceGroupName, String resourceName, String endpointName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, resourceName, endpointName), serviceCallback);
+ }
+
+ /**
+ * Get DigitalTwinsInstances Endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DigitalTwinsEndpointResourceInner object
+ */
+ public Observable getAsync(String resourceGroupName, String resourceName, String endpointName) {
+ return getWithServiceResponseAsync(resourceGroupName, resourceName, endpointName).map(new Func1, DigitalTwinsEndpointResourceInner>() {
+ @Override
+ public DigitalTwinsEndpointResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get DigitalTwinsInstances Endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DigitalTwinsEndpointResourceInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String resourceName, String endpointName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ if (endpointName == null) {
+ throw new IllegalArgumentException("Parameter endpointName is required and cannot be null.");
+ }
+ return service.get(this.client.subscriptionId(), resourceGroupName, resourceName, endpointName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DigitalTwinsEndpointResourceInner object if successful.
+ */
+ public DigitalTwinsEndpointResourceInner createOrUpdate(String resourceGroupName, String resourceName, String endpointName) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, endpointName).toBlocking().last().body();
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture createOrUpdateAsync(String resourceGroupName, String resourceName, String endpointName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, endpointName), serviceCallback);
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String resourceName, String endpointName) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, endpointName).map(new Func1, DigitalTwinsEndpointResourceInner>() {
+ @Override
+ public DigitalTwinsEndpointResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, String endpointName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ if (endpointName == null) {
+ throw new IllegalArgumentException("Parameter endpointName is required and cannot be null.");
+ }
+ final DigitalTwinsEndpointResourceProperties properties = null;
+ DigitalTwinsEndpointResourceInner endpointDescription = new DigitalTwinsEndpointResourceInner();
+ endpointDescription.withProperties(null);
+ Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, endpointName, this.client.apiVersion(), this.client.acceptLanguage(), endpointDescription, this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @param properties DigitalTwinsInstance endpoint resource properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DigitalTwinsEndpointResourceInner object if successful.
+ */
+ public DigitalTwinsEndpointResourceInner createOrUpdate(String resourceGroupName, String resourceName, String endpointName, DigitalTwinsEndpointResourceProperties properties) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, endpointName, properties).toBlocking().last().body();
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @param properties DigitalTwinsInstance endpoint resource properties.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture createOrUpdateAsync(String resourceGroupName, String resourceName, String endpointName, DigitalTwinsEndpointResourceProperties properties, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, endpointName, properties), serviceCallback);
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @param properties DigitalTwinsInstance endpoint resource properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String resourceName, String endpointName, DigitalTwinsEndpointResourceProperties properties) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, endpointName, properties).map(new Func1, DigitalTwinsEndpointResourceInner>() {
+ @Override
+ public DigitalTwinsEndpointResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @param properties DigitalTwinsInstance endpoint resource properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, String endpointName, DigitalTwinsEndpointResourceProperties properties) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ if (endpointName == null) {
+ throw new IllegalArgumentException("Parameter endpointName is required and cannot be null.");
+ }
+ Validator.validate(properties);
+ DigitalTwinsEndpointResourceInner endpointDescription = new DigitalTwinsEndpointResourceInner();
+ endpointDescription.withProperties(properties);
+ Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, endpointName, this.client.apiVersion(), this.client.acceptLanguage(), endpointDescription, this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DigitalTwinsEndpointResourceInner object if successful.
+ */
+ public DigitalTwinsEndpointResourceInner beginCreateOrUpdate(String resourceGroupName, String resourceName, String endpointName) {
+ return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, endpointName).toBlocking().single().body();
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, String endpointName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, endpointName), serviceCallback);
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DigitalTwinsEndpointResourceInner object
+ */
+ public Observable beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, String endpointName) {
+ return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, endpointName).map(new Func1, DigitalTwinsEndpointResourceInner>() {
+ @Override
+ public DigitalTwinsEndpointResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DigitalTwinsEndpointResourceInner object
+ */
+ public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, String endpointName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ if (endpointName == null) {
+ throw new IllegalArgumentException("Parameter endpointName is required and cannot be null.");
+ }
+ final DigitalTwinsEndpointResourceProperties properties = null;
+ DigitalTwinsEndpointResourceInner endpointDescription = new DigitalTwinsEndpointResourceInner();
+ endpointDescription.withProperties(null);
+ return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, endpointName, this.client.apiVersion(), this.client.acceptLanguage(), endpointDescription, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @param properties DigitalTwinsInstance endpoint resource properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DigitalTwinsEndpointResourceInner object if successful.
+ */
+ public DigitalTwinsEndpointResourceInner beginCreateOrUpdate(String resourceGroupName, String resourceName, String endpointName, DigitalTwinsEndpointResourceProperties properties) {
+ return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, endpointName, properties).toBlocking().single().body();
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @param properties DigitalTwinsInstance endpoint resource properties.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, String endpointName, DigitalTwinsEndpointResourceProperties properties, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, endpointName, properties), serviceCallback);
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @param properties DigitalTwinsInstance endpoint resource properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DigitalTwinsEndpointResourceInner object
+ */
+ public Observable beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, String endpointName, DigitalTwinsEndpointResourceProperties properties) {
+ return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, endpointName, properties).map(new Func1, DigitalTwinsEndpointResourceInner>() {
+ @Override
+ public DigitalTwinsEndpointResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @param properties DigitalTwinsInstance endpoint resource properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DigitalTwinsEndpointResourceInner object
+ */
+ public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, String endpointName, DigitalTwinsEndpointResourceProperties properties) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ if (endpointName == null) {
+ throw new IllegalArgumentException("Parameter endpointName is required and cannot be null.");
+ }
+ Validator.validate(properties);
+ DigitalTwinsEndpointResourceInner endpointDescription = new DigitalTwinsEndpointResourceInner();
+ endpointDescription.withProperties(properties);
+ return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, endpointName, this.client.apiVersion(), this.client.acceptLanguage(), endpointDescription, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Delete a DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DigitalTwinsEndpointResourceInner object if successful.
+ */
+ public DigitalTwinsEndpointResourceInner delete(String resourceGroupName, String resourceName, String endpointName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, resourceName, endpointName).toBlocking().last().body();
+ }
+
+ /**
+ * Delete a DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture deleteAsync(String resourceGroupName, String resourceName, String endpointName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, resourceName, endpointName), serviceCallback);
+ }
+
+ /**
+ * Delete a DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable deleteAsync(String resourceGroupName, String resourceName, String endpointName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, resourceName, endpointName).map(new Func1, DigitalTwinsEndpointResourceInner>() {
+ @Override
+ public DigitalTwinsEndpointResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Delete a DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String resourceName, String endpointName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ if (endpointName == null) {
+ throw new IllegalArgumentException("Parameter endpointName is required and cannot be null.");
+ }
+ Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, resourceName, endpointName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Delete a DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DigitalTwinsEndpointResourceInner object if successful.
+ */
+ public DigitalTwinsEndpointResourceInner beginDelete(String resourceGroupName, String resourceName, String endpointName) {
+ return beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName, endpointName).toBlocking().single().body();
+ }
+
+ /**
+ * Delete a DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture beginDeleteAsync(String resourceGroupName, String resourceName, String endpointName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName, endpointName), serviceCallback);
+ }
+
+ /**
+ * Delete a DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DigitalTwinsEndpointResourceInner object
+ */
+ public Observable beginDeleteAsync(String resourceGroupName, String resourceName, String endpointName) {
+ return beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName, endpointName).map(new Func1, DigitalTwinsEndpointResourceInner>() {
+ @Override
+ public DigitalTwinsEndpointResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Delete a DigitalTwinsInstance endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param endpointName Name of Endpoint Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DigitalTwinsEndpointResourceInner object
+ */
+ public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String resourceName, String endpointName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ if (endpointName == null) {
+ throw new IllegalArgumentException("Parameter endpointName is required and cannot be null.");
+ }
+ return service.beginDelete(this.client.subscriptionId(), resourceGroupName, resourceName, endpointName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginDeleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginDeleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(202, new TypeToken() { }.getType())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Get DigitalTwinsInstance Endpoints.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<DigitalTwinsEndpointResourceInner> object if successful.
+ */
+ public PagedList listNext(final String nextPageLink) {
+ ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Get DigitalTwinsInstance Endpoints.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Get DigitalTwinsInstance Endpoints.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DigitalTwinsEndpointResourceInner> object
+ */
+ public Observable> listNextAsync(final String nextPageLink) {
+ return listNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get DigitalTwinsInstance Endpoints.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DigitalTwinsEndpointResourceInner> object
+ */
+ public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Get DigitalTwinsInstance Endpoints.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<DigitalTwinsEndpointResourceInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listNextSinglePageAsync(final String nextPageLink) {
+ if (nextPageLink == null) {
+ throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
+ }
+ String nextUrl = String.format("%s", nextPageLink);
+ return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsImpl.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsImpl.java
new file mode 100644
index 0000000000000..300f343cc211c
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsImpl.java
@@ -0,0 +1,118 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * abc
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwins;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsDescription;
+import com.microsoft.azure.Page;
+import rx.Completable;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.CheckNameResult;
+
+class DigitalTwinsImpl extends WrapperImpl implements DigitalTwins {
+ private final DigitalTwinsManager manager;
+
+ DigitalTwinsImpl(DigitalTwinsManager manager) {
+ super(manager.inner().digitalTwins());
+ this.manager = manager;
+ }
+
+ public DigitalTwinsManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public DigitalTwinsDescriptionImpl defineDigitalTwinsInstance(String name) {
+ return wrapDigitalTwinsInstanceModel(name);
+ }
+
+ private DigitalTwinsDescriptionImpl wrapDigitalTwinsInstanceModel(String name) {
+ return new DigitalTwinsDescriptionImpl(name, new DigitalTwinsDescriptionInner(), this.manager());
+ }
+
+ private DigitalTwinsDescriptionImpl wrapDigitalTwinsDescriptionModel(DigitalTwinsDescriptionInner inner) {
+ return new DigitalTwinsDescriptionImpl(inner.name(), inner, manager());
+ }
+
+ private Observable getDigitalTwinsDescriptionInnerUsingDigitalTwinsInnerAsync(String resourceGroupName, String name) {
+ DigitalTwinsInner client = this.inner();
+ return client.getByResourceGroupAsync(resourceGroupName, name);
+ }
+
+ @Override
+ public Observable getByResourceGroupAsync(String resourceGroupName, String name) {
+ return this.getDigitalTwinsDescriptionInnerUsingDigitalTwinsInnerAsync(resourceGroupName, name).flatMap(new Func1> () {
+ @Override
+ public Observable call(DigitalTwinsDescriptionInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((DigitalTwinsDescription)wrapDigitalTwinsDescriptionModel(inner));
+ }
+ }
+ });
+ }
+
+ @Override
+ public Observable listByResourceGroupAsync(String resourceGroupName) {
+ DigitalTwinsInner client = this.inner();
+ return client.listByResourceGroupAsync(resourceGroupName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public DigitalTwinsDescription call(DigitalTwinsDescriptionInner inner) {
+ return wrapDigitalTwinsDescriptionModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable listAsync() {
+ DigitalTwinsInner client = this.inner();
+ return client.listAsync()
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public DigitalTwinsDescription call(DigitalTwinsDescriptionInner inner) {
+ return wrapDigitalTwinsDescriptionModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String name) {
+ return this.inner().deleteAsync(resourceGroupName, name).toCompletable();
+ }
+
+ @Override
+ public Observable checkNameAvailabilityAsync(String location, String name) {
+ DigitalTwinsInner client = this.inner();
+ return client.checkNameAvailabilityAsync(location, name)
+ .map(new Func1() {
+ @Override
+ public CheckNameResult call(CheckNameResultInner inner) {
+ return new CheckNameResultImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsInner.java b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsInner.java
new file mode 100644
index 0000000000000..90c2dd2e1a268
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_10_31/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_10_31/implementation/DigitalTwinsInner.java
@@ -0,0 +1,1355 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.digitaltwins.v2020_10_31.implementation;
+
+import com.microsoft.azure.arm.collection.InnerSupportsGet;
+import com.microsoft.azure.arm.collection.InnerSupportsDelete;
+import com.microsoft.azure.arm.collection.InnerSupportsListing;
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.CheckNameRequest;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwinsPatchDescription;
+import com.microsoft.azure.management.digitaltwins.v2020_10_31.ErrorResponseException;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.PATCH;
+import retrofit2.http.Path;
+import retrofit2.http.POST;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.http.Url;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in DigitalTwins.
+ */
+public class DigitalTwinsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing {
+ /** The Retrofit service to perform REST calls. */
+ private DigitalTwinsService service;
+ /** The service client containing this operation class. */
+ private AzureDigitalTwinsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DigitalTwinsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public DigitalTwinsInner(Retrofit retrofit, AzureDigitalTwinsManagementClientImpl client) {
+ this.service = retrofit.create(DigitalTwinsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DigitalTwins to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface DigitalTwinsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwins getByResourceGroup" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}")
+ Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwins createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}")
+ Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body DigitalTwinsDescriptionInner digitalTwinsCreate, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwins beginCreateOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}")
+ Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body DigitalTwinsDescriptionInner digitalTwinsCreate, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwins update" })
+ @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}")
+ Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DigitalTwinsPatchDescription digitalTwinsPatchDescription, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwins beginUpdate" })
+ @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}")
+ Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DigitalTwinsPatchDescription digitalTwinsPatchDescription, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwins delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwins beginDelete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}", method = "DELETE", hasBody = true)
+ Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwins list" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.DigitalTwins/digitalTwinsInstances")
+ Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwins listByResourceGroup" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances")
+ Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwins checkNameAvailability" })
+ @POST("subscriptions/{subscriptionId}/providers/Microsoft.DigitalTwins/locations/{location}/checkNameAvailability")
+ Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckNameRequest digitalTwinsInstanceCheckName, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwins listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_10_31.DigitalTwins listByResourceGroupNext" })
+ @GET
+ Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Get DigitalTwinsInstances resource.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DigitalTwinsDescriptionInner object if successful.
+ */
+ public DigitalTwinsDescriptionInner getByResourceGroup(String resourceGroupName, String resourceName) {
+ return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body();
+ }
+
+ /**
+ * Get DigitalTwinsInstances resource.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback);
+ }
+
+ /**
+ * Get DigitalTwinsInstances resource.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DigitalTwinsDescriptionInner object
+ */
+ public Observable getByResourceGroupAsync(String resourceGroupName, String resourceName) {
+ return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1