diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/pom.xml b/sdk/digitaltwins/mgmt-v2020_12_01/pom.xml
new file mode 100644
index 0000000000000..e3a28f5f74567
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/pom.xml
@@ -0,0 +1,135 @@
+
+
+ 4.0.0
+ com.microsoft.azure.digitaltwins.v2020_12_01
+
+ 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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/AuthenticationType.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/AuthenticationType.java
new file mode 100644
index 0000000000000..0f1d5ead116a3
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/AuthenticationType.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_12_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for AuthenticationType.
+ */
+public final class AuthenticationType extends ExpandableStringEnum {
+ /** Static value KeyBased for AuthenticationType. */
+ public static final AuthenticationType KEY_BASED = fromString("KeyBased");
+
+ /** Static value IdentityBased for AuthenticationType. */
+ public static final AuthenticationType IDENTITY_BASED = fromString("IdentityBased");
+
+ /**
+ * Creates or finds a AuthenticationType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding AuthenticationType
+ */
+ @JsonCreator
+ public static AuthenticationType fromString(String name) {
+ return fromString(name, AuthenticationType.class);
+ }
+
+ /**
+ * @return known AuthenticationType values
+ */
+ public static Collection values() {
+ return values(AuthenticationType.class);
+ }
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/CheckNameRequest.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/CheckNameRequest.java
new file mode 100644
index 0000000000000..6aef4c355eedf
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/CheckNameResult.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/CheckNameResult.java
new file mode 100644
index 0000000000000..00df6d5466379
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.implementation.DigitalTwinsManager;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwins.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwins.java
new file mode 100644
index 0000000000000..e311face11aa2
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsDescription.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsDescription.java
new file mode 100644
index 0000000000000..0cf74e0e3e5ae
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsDescription.java
@@ -0,0 +1,137 @@
+/**
+ * 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_12_01;
+
+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_12_01.implementation.DigitalTwinsManager;
+import org.joda.time.DateTime;
+import java.util.List;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.implementation.PrivateEndpointConnectionInner;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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 identity value.
+ */
+ DigitalTwinsIdentity identity();
+
+ /**
+ * @return the lastUpdatedTime value.
+ */
+ DateTime lastUpdatedTime();
+
+ /**
+ * @return the privateEndpointConnections value.
+ */
+ List privateEndpointConnections();
+
+ /**
+ * @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 digitaltwinsdescription definition allowing to specify Identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies identity.
+ * @param identity The managed identity for the DigitalTwinsInstance
+ * @return the next definition stage
+ */
+ WithCreate withIdentity(DigitalTwinsIdentity identity);
+ }
+
+ /**
+ * The stage of the digitaltwinsdescription definition allowing to specify PrivateEndpointConnections.
+ */
+ interface WithPrivateEndpointConnections {
+ /**
+ * Specifies privateEndpointConnections.
+ * @param privateEndpointConnections the privateEndpointConnections parameter value
+ * @return the next definition stage
+ */
+ WithCreate withPrivateEndpointConnections(List privateEndpointConnections);
+ }
+
+ /**
+ * 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, DefinitionStages.WithIdentity, DefinitionStages.WithPrivateEndpointConnections {
+ }
+ }
+ /**
+ * The template for a DigitalTwinsDescription update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithIdentity {
+ }
+
+ /**
+ * Grouping of DigitalTwinsDescription update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the digitaltwinsdescription update allowing to specify Identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies identity.
+ * @param identity The managed identity for the DigitalTwinsInstance
+ * @return the next update stage
+ */
+ Update withIdentity(DigitalTwinsIdentity identity);
+ }
+
+ }
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsEndpointResource.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsEndpointResource.java
new file mode 100644
index 0000000000000..f37a118bb5076
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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_12_01.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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsEndpointResourceProperties.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsEndpointResourceProperties.java
new file mode 100644
index 0000000000000..52cd77b783e7e
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsEndpointResourceProperties.java
@@ -0,0 +1,140 @@
+/**
+ * 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_12_01;
+
+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;
+
+ /**
+ * Specifies the authentication type being used for connecting to the
+ * endpoint. Possible values include: 'KeyBased', 'IdentityBased'.
+ */
+ @JsonProperty(value = "authenticationType")
+ private AuthenticationType authenticationType;
+
+ /**
+ * Dead letter storage secret for key-based authentication. Will be
+ * obfuscated during read.
+ */
+ @JsonProperty(value = "deadLetterSecret")
+ private String deadLetterSecret;
+
+ /**
+ * Dead letter storage URL for identity-based authentication.
+ */
+ @JsonProperty(value = "deadLetterUri")
+ private String deadLetterUri;
+
+ /**
+ * 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 specifies the authentication type being used for connecting to the endpoint. Possible values include: 'KeyBased', 'IdentityBased'.
+ *
+ * @return the authenticationType value
+ */
+ public AuthenticationType authenticationType() {
+ return this.authenticationType;
+ }
+
+ /**
+ * Set specifies the authentication type being used for connecting to the endpoint. Possible values include: 'KeyBased', 'IdentityBased'.
+ *
+ * @param authenticationType the authenticationType value to set
+ * @return the DigitalTwinsEndpointResourceProperties object itself.
+ */
+ public DigitalTwinsEndpointResourceProperties withAuthenticationType(AuthenticationType authenticationType) {
+ this.authenticationType = authenticationType;
+ return this;
+ }
+
+ /**
+ * Get dead letter storage secret for key-based authentication. Will be obfuscated during read.
+ *
+ * @return the deadLetterSecret value
+ */
+ public String deadLetterSecret() {
+ return this.deadLetterSecret;
+ }
+
+ /**
+ * Set dead letter storage secret for key-based authentication. 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;
+ }
+
+ /**
+ * Get dead letter storage URL for identity-based authentication.
+ *
+ * @return the deadLetterUri value
+ */
+ public String deadLetterUri() {
+ return this.deadLetterUri;
+ }
+
+ /**
+ * Set dead letter storage URL for identity-based authentication.
+ *
+ * @param deadLetterUri the deadLetterUri value to set
+ * @return the DigitalTwinsEndpointResourceProperties object itself.
+ */
+ public DigitalTwinsEndpointResourceProperties withDeadLetterUri(String deadLetterUri) {
+ this.deadLetterUri = deadLetterUri;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsEndpoints.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsEndpoints.java
new file mode 100644
index 0000000000000..981c2025b258b
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsIdentity.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsIdentity.java
new file mode 100644
index 0000000000000..dae543e5da9be
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsIdentity.java
@@ -0,0 +1,79 @@
+/**
+ * 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_12_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The managed identity for the DigitalTwinsInstance.
+ */
+public class DigitalTwinsIdentity {
+ /**
+ * The type of Managed Identity used by the DigitalTwinsInstance. Only
+ * SystemAssigned is supported. Possible values include: 'None',
+ * 'SystemAssigned'.
+ */
+ @JsonProperty(value = "type")
+ private DigitalTwinsIdentityType type;
+
+ /**
+ * The object id of the Managed Identity Resource. This will be sent to the
+ * RP from ARM via the x-ms-identity-principal-id header in the PUT request
+ * if the resource has a systemAssigned(implicit) identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private String principalId;
+
+ /**
+ * The tenant id of the Managed Identity Resource. This will be sent to the
+ * RP from ARM via the x-ms-client-tenant-id header in the PUT request if
+ * the resource has a systemAssigned(implicit) identity.
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private String tenantId;
+
+ /**
+ * Get the type of Managed Identity used by the DigitalTwinsInstance. Only SystemAssigned is supported. Possible values include: 'None', 'SystemAssigned'.
+ *
+ * @return the type value
+ */
+ public DigitalTwinsIdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type of Managed Identity used by the DigitalTwinsInstance. Only SystemAssigned is supported. Possible values include: 'None', 'SystemAssigned'.
+ *
+ * @param type the type value to set
+ * @return the DigitalTwinsIdentity object itself.
+ */
+ public DigitalTwinsIdentity withType(DigitalTwinsIdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity.
+ *
+ * @return the principalId value
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity.
+ *
+ * @return the tenantId value
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsIdentityType.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsIdentityType.java
new file mode 100644
index 0000000000000..d98e2edfc5c2c
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsIdentityType.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_12_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for DigitalTwinsIdentityType.
+ */
+public final class DigitalTwinsIdentityType extends ExpandableStringEnum {
+ /** Static value None for DigitalTwinsIdentityType. */
+ public static final DigitalTwinsIdentityType NONE = fromString("None");
+
+ /** Static value SystemAssigned for DigitalTwinsIdentityType. */
+ public static final DigitalTwinsIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned");
+
+ /**
+ * Creates or finds a DigitalTwinsIdentityType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding DigitalTwinsIdentityType
+ */
+ @JsonCreator
+ public static DigitalTwinsIdentityType fromString(String name) {
+ return fromString(name, DigitalTwinsIdentityType.class);
+ }
+
+ /**
+ * @return known DigitalTwinsIdentityType values
+ */
+ public static Collection values() {
+ return values(DigitalTwinsIdentityType.class);
+ }
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsPatchDescription.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsPatchDescription.java
new file mode 100644
index 0000000000000..5a7e941adc8e1
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsPatchDescription.java
@@ -0,0 +1,70 @@
+/**
+ * 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_12_01;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The description of the DigitalTwins service.
+ */
+public class DigitalTwinsPatchDescription {
+ /**
+ * Instance patch properties.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * The managed identity for the DigitalTwinsInstance.
+ */
+ @JsonProperty(value = "identity")
+ private DigitalTwinsIdentity identity;
+
+ /**
+ * Get instance patch properties.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set instance patch properties.
+ *
+ * @param tags the tags value to set
+ * @return the DigitalTwinsPatchDescription object itself.
+ */
+ public DigitalTwinsPatchDescription withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the managed identity for the DigitalTwinsInstance.
+ *
+ * @return the identity value
+ */
+ public DigitalTwinsIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the managed identity for the DigitalTwinsInstance.
+ *
+ * @param identity the identity value to set
+ * @return the DigitalTwinsPatchDescription object itself.
+ */
+ public DigitalTwinsPatchDescription withIdentity(DigitalTwinsIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsResource.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsResource.java
new file mode 100644
index 0000000000000..c67a9c0238baa
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/DigitalTwinsResource.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_12_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.Resource;
+
+/**
+ * The common properties of a DigitalTwinsInstance.
+ */
+public class DigitalTwinsResource extends Resource {
+ /**
+ * The managed identity for the DigitalTwinsInstance.
+ */
+ @JsonProperty(value = "identity")
+ private DigitalTwinsIdentity identity;
+
+ /**
+ * Get the managed identity for the DigitalTwinsInstance.
+ *
+ * @return the identity value
+ */
+ public DigitalTwinsIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the managed identity for the DigitalTwinsInstance.
+ *
+ * @param identity the identity value to set
+ * @return the DigitalTwinsResource object itself.
+ */
+ public DigitalTwinsResource withIdentity(DigitalTwinsIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/EndpointProvisioningState.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/EndpointProvisioningState.java
new file mode 100644
index 0000000000000..0a16ac9b7a8a7
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ErrorDefinition.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ErrorDefinition.java
new file mode 100644
index 0000000000000..f19c75bcc90ff
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ErrorResponse.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ErrorResponse.java
new file mode 100644
index 0000000000000..a9cb80ecd331f
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ErrorResponseException.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ErrorResponseException.java
new file mode 100644
index 0000000000000..02a83e5447ccc
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/EventGrid.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/EventGrid.java
new file mode 100644
index 0000000000000..ac34575fd97b9
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/EventHub.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/EventHub.java
new file mode 100644
index 0000000000000..e353e39c77c6d
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/EventHub.java
@@ -0,0 +1,129 @@
+/**
+ * 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_12_01;
+
+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 for key-based authentication.
+ * Will be obfuscated during read.
+ */
+ @JsonProperty(value = "connectionStringPrimaryKey")
+ private String connectionStringPrimaryKey;
+
+ /**
+ * SecondaryConnectionString of the endpoint for key-based authentication.
+ * Will be obfuscated during read.
+ */
+ @JsonProperty(value = "connectionStringSecondaryKey")
+ private String connectionStringSecondaryKey;
+
+ /**
+ * The URL of the EventHub namespace for identity-based authentication. It
+ * must include the protocol sb://.
+ */
+ @JsonProperty(value = "endpointUri")
+ private String endpointUri;
+
+ /**
+ * The EventHub name in the EventHub namespace for identity-based
+ * authentication.
+ */
+ @JsonProperty(value = "entityPath")
+ private String entityPath;
+
+ /**
+ * Get primaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.
+ *
+ * @return the connectionStringPrimaryKey value
+ */
+ public String connectionStringPrimaryKey() {
+ return this.connectionStringPrimaryKey;
+ }
+
+ /**
+ * Set primaryConnectionString of the endpoint for key-based authentication. 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 for key-based authentication. Will be obfuscated during read.
+ *
+ * @return the connectionStringSecondaryKey value
+ */
+ public String connectionStringSecondaryKey() {
+ return this.connectionStringSecondaryKey;
+ }
+
+ /**
+ * Set secondaryConnectionString of the endpoint for key-based authentication. 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;
+ }
+
+ /**
+ * Get the URL of the EventHub namespace for identity-based authentication. It must include the protocol sb://.
+ *
+ * @return the endpointUri value
+ */
+ public String endpointUri() {
+ return this.endpointUri;
+ }
+
+ /**
+ * Set the URL of the EventHub namespace for identity-based authentication. It must include the protocol sb://.
+ *
+ * @param endpointUri the endpointUri value to set
+ * @return the EventHub object itself.
+ */
+ public EventHub withEndpointUri(String endpointUri) {
+ this.endpointUri = endpointUri;
+ return this;
+ }
+
+ /**
+ * Get the EventHub name in the EventHub namespace for identity-based authentication.
+ *
+ * @return the entityPath value
+ */
+ public String entityPath() {
+ return this.entityPath;
+ }
+
+ /**
+ * Set the EventHub name in the EventHub namespace for identity-based authentication.
+ *
+ * @param entityPath the entityPath value to set
+ * @return the EventHub object itself.
+ */
+ public EventHub withEntityPath(String entityPath) {
+ this.entityPath = entityPath;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ExternalResource.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ExternalResource.java
new file mode 100644
index 0000000000000..50994de59069c
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * Definition of a resource.
+ */
+public class ExternalResource extends ProxyResource {
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/GroupIdInformationProperties.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/GroupIdInformationProperties.java
new file mode 100644
index 0000000000000..5ca68e7ed59e8
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/GroupIdInformationProperties.java
@@ -0,0 +1,96 @@
+/**
+ * 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_12_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties for a group information object.
+ */
+public class GroupIdInformationProperties {
+ /**
+ * The group id.
+ */
+ @JsonProperty(value = "groupId")
+ private String groupId;
+
+ /**
+ * The required members for a specific group id.
+ */
+ @JsonProperty(value = "requiredMembers")
+ private List requiredMembers;
+
+ /**
+ * The required DNS zones for a specific group id.
+ */
+ @JsonProperty(value = "requiredZoneNames")
+ private List requiredZoneNames;
+
+ /**
+ * Get the group id.
+ *
+ * @return the groupId value
+ */
+ public String groupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Set the group id.
+ *
+ * @param groupId the groupId value to set
+ * @return the GroupIdInformationProperties object itself.
+ */
+ public GroupIdInformationProperties withGroupId(String groupId) {
+ this.groupId = groupId;
+ return this;
+ }
+
+ /**
+ * Get the required members for a specific group id.
+ *
+ * @return the requiredMembers value
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Set the required members for a specific group id.
+ *
+ * @param requiredMembers the requiredMembers value to set
+ * @return the GroupIdInformationProperties object itself.
+ */
+ public GroupIdInformationProperties withRequiredMembers(List requiredMembers) {
+ this.requiredMembers = requiredMembers;
+ return this;
+ }
+
+ /**
+ * Get the required DNS zones for a specific group id.
+ *
+ * @return the requiredZoneNames value
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Set the required DNS zones for a specific group id.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set
+ * @return the GroupIdInformationProperties object itself.
+ */
+ public GroupIdInformationProperties withRequiredZoneNames(List requiredZoneNames) {
+ this.requiredZoneNames = requiredZoneNames;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/GroupIdInformationPropertiesModel.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/GroupIdInformationPropertiesModel.java
new file mode 100644
index 0000000000000..0ffe1df56db77
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/GroupIdInformationPropertiesModel.java
@@ -0,0 +1,16 @@
+/**
+ * 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_12_01;
+
+
+/**
+ * The GroupIdInformationPropertiesModel model.
+ */
+public class GroupIdInformationPropertiesModel extends GroupIdInformationProperties {
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/Operation.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/Operation.java
new file mode 100644
index 0000000000000..6e2a395995877
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.implementation.DigitalTwinsManager;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/OperationDisplay.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/OperationDisplay.java
new file mode 100644
index 0000000000000..d7cae49357c1f
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/Operations.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/Operations.java
new file mode 100644
index 0000000000000..608a03d545bde
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpoint.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpoint.java
new file mode 100644
index 0000000000000..88a0367508267
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpoint.java
@@ -0,0 +1,32 @@
+/**
+ * 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_12_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The private endpoint property of a private endpoint connection.
+ */
+public class PrivateEndpoint {
+ /**
+ * The resource identifier.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /**
+ * Get the resource identifier.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpointConnectionProperties.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpointConnectionProperties.java
new file mode 100644
index 0000000000000..864f9ffcb0d66
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,16 @@
+/**
+ * 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_12_01;
+
+
+/**
+ * The PrivateEndpointConnectionProperties model.
+ */
+public class PrivateEndpointConnectionProperties extends PrivateEndpointConnectionPropertiesModel {
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpointConnectionPropertiesModel.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpointConnectionPropertiesModel.java
new file mode 100644
index 0000000000000..5cf74b196b2d4
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpointConnectionPropertiesModel.java
@@ -0,0 +1,69 @@
+/**
+ * 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_12_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of a private endpoint connection.
+ */
+public class PrivateEndpointConnectionPropertiesModel {
+ /**
+ * The privateEndpoint property.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpointConnectionPropertiesPrivateEndpoint privateEndpoint;
+
+ /**
+ * The privateLinkServiceConnectionState property.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState")
+ private PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /**
+ * Get the privateEndpoint value.
+ *
+ * @return the privateEndpoint value
+ */
+ public PrivateEndpointConnectionPropertiesPrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint value.
+ *
+ * @param privateEndpoint the privateEndpoint value to set
+ * @return the PrivateEndpointConnectionPropertiesModel object itself.
+ */
+ public PrivateEndpointConnectionPropertiesModel withPrivateEndpoint(PrivateEndpointConnectionPropertiesPrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState value.
+ *
+ * @return the privateLinkServiceConnectionState value
+ */
+ public PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState value.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set
+ * @return the PrivateEndpointConnectionPropertiesModel object itself.
+ */
+ public PrivateEndpointConnectionPropertiesModel withPrivateLinkServiceConnectionState(PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpointConnectionPropertiesPrivateEndpoint.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpointConnectionPropertiesPrivateEndpoint.java
new file mode 100644
index 0000000000000..fc2b2a61cbcdb
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpointConnectionPropertiesPrivateEndpoint.java
@@ -0,0 +1,16 @@
+/**
+ * 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_12_01;
+
+
+/**
+ * The PrivateEndpointConnectionPropertiesPrivateEndpoint model.
+ */
+public class PrivateEndpointConnectionPropertiesPrivateEndpoint extends PrivateEndpoint {
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState.java
new file mode 100644
index 0000000000000..6077b8e939a8d
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState.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_12_01;
+
+
+/**
+ * The PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState
+ * model.
+ */
+public class PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState extends PrivateLinkServiceConnectionState {
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateLinkServiceConnectionState.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateLinkServiceConnectionState.java
new file mode 100644
index 0000000000000..fb5c6b560062f
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateLinkServiceConnectionState.java
@@ -0,0 +1,96 @@
+/**
+ * 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_12_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The current state of a private endpoint connection.
+ */
+public class PrivateLinkServiceConnectionState {
+ /**
+ * The status of a private endpoint connection. Possible values include:
+ * 'Pending', 'Approved', 'Rejected', 'Disconnected'.
+ */
+ @JsonProperty(value = "status", required = true)
+ private PrivateLinkServiceConnectionStatus status;
+
+ /**
+ * The description for the current state of a private endpoint connection.
+ */
+ @JsonProperty(value = "description", required = true)
+ private String description;
+
+ /**
+ * Actions required for a private endpoint connection.
+ */
+ @JsonProperty(value = "actionsRequired")
+ private String actionsRequired;
+
+ /**
+ * Get the status of a private endpoint connection. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'.
+ *
+ * @return the status value
+ */
+ public PrivateLinkServiceConnectionStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status of a private endpoint connection. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'.
+ *
+ * @param status the status value to set
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withStatus(PrivateLinkServiceConnectionStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the description for the current state of a private endpoint connection.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description for the current state of a private endpoint connection.
+ *
+ * @param description the description value to set
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get actions required for a private endpoint connection.
+ *
+ * @return the actionsRequired value
+ */
+ public String actionsRequired() {
+ return this.actionsRequired;
+ }
+
+ /**
+ * Set actions required for a private endpoint connection.
+ *
+ * @param actionsRequired the actionsRequired value to set
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) {
+ this.actionsRequired = actionsRequired;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateLinkServiceConnectionStatus.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateLinkServiceConnectionStatus.java
new file mode 100644
index 0000000000000..24970a435e494
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/PrivateLinkServiceConnectionStatus.java
@@ -0,0 +1,47 @@
+/**
+ * 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_12_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for PrivateLinkServiceConnectionStatus.
+ */
+public final class PrivateLinkServiceConnectionStatus extends ExpandableStringEnum {
+ /** Static value Pending for PrivateLinkServiceConnectionStatus. */
+ public static final PrivateLinkServiceConnectionStatus PENDING = fromString("Pending");
+
+ /** Static value Approved for PrivateLinkServiceConnectionStatus. */
+ public static final PrivateLinkServiceConnectionStatus APPROVED = fromString("Approved");
+
+ /** Static value Rejected for PrivateLinkServiceConnectionStatus. */
+ public static final PrivateLinkServiceConnectionStatus REJECTED = fromString("Rejected");
+
+ /** Static value Disconnected for PrivateLinkServiceConnectionStatus. */
+ public static final PrivateLinkServiceConnectionStatus DISCONNECTED = fromString("Disconnected");
+
+ /**
+ * Creates or finds a PrivateLinkServiceConnectionStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding PrivateLinkServiceConnectionStatus
+ */
+ @JsonCreator
+ public static PrivateLinkServiceConnectionStatus fromString(String name) {
+ return fromString(name, PrivateLinkServiceConnectionStatus.class);
+ }
+
+ /**
+ * @return known PrivateLinkServiceConnectionStatus values
+ */
+ public static Collection values() {
+ return values(PrivateLinkServiceConnectionStatus.class);
+ }
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ProvisioningState.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ProvisioningState.java
new file mode 100644
index 0000000000000..0b8435cf15f55
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ProvisioningState.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_12_01;
+
+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 Updating for ProvisioningState. */
+ public static final ProvisioningState UPDATING = fromString("Updating");
+
+ /** 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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/Reason.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/Reason.java
new file mode 100644
index 0000000000000..024f6039eb8fa
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01;
+
+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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ServiceBus.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ServiceBus.java
new file mode 100644
index 0000000000000..2bee6364cb18b
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/ServiceBus.java
@@ -0,0 +1,128 @@
+/**
+ * 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_12_01;
+
+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 for key-based authentication.
+ * Will be obfuscated during read.
+ */
+ @JsonProperty(value = "primaryConnectionString")
+ private String primaryConnectionString;
+
+ /**
+ * SecondaryConnectionString of the endpoint for key-based authentication.
+ * Will be obfuscated during read.
+ */
+ @JsonProperty(value = "secondaryConnectionString")
+ private String secondaryConnectionString;
+
+ /**
+ * The URL of the ServiceBus namespace for identity-based authentication.
+ * It must include the protocol sb://.
+ */
+ @JsonProperty(value = "endpointUri")
+ private String endpointUri;
+
+ /**
+ * The ServiceBus Topic name for identity-based authentication.
+ */
+ @JsonProperty(value = "entityPath")
+ private String entityPath;
+
+ /**
+ * Get primaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.
+ *
+ * @return the primaryConnectionString value
+ */
+ public String primaryConnectionString() {
+ return this.primaryConnectionString;
+ }
+
+ /**
+ * Set primaryConnectionString of the endpoint for key-based authentication. 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 for key-based authentication. Will be obfuscated during read.
+ *
+ * @return the secondaryConnectionString value
+ */
+ public String secondaryConnectionString() {
+ return this.secondaryConnectionString;
+ }
+
+ /**
+ * Set secondaryConnectionString of the endpoint for key-based authentication. 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;
+ }
+
+ /**
+ * Get the URL of the ServiceBus namespace for identity-based authentication. It must include the protocol sb://.
+ *
+ * @return the endpointUri value
+ */
+ public String endpointUri() {
+ return this.endpointUri;
+ }
+
+ /**
+ * Set the URL of the ServiceBus namespace for identity-based authentication. It must include the protocol sb://.
+ *
+ * @param endpointUri the endpointUri value to set
+ * @return the ServiceBus object itself.
+ */
+ public ServiceBus withEndpointUri(String endpointUri) {
+ this.endpointUri = endpointUri;
+ return this;
+ }
+
+ /**
+ * Get the ServiceBus Topic name for identity-based authentication.
+ *
+ * @return the entityPath value
+ */
+ public String entityPath() {
+ return this.entityPath;
+ }
+
+ /**
+ * Set the ServiceBus Topic name for identity-based authentication.
+ *
+ * @param entityPath the entityPath value to set
+ * @return the ServiceBus object itself.
+ */
+ public ServiceBus withEntityPath(String entityPath) {
+ this.entityPath = entityPath;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/AzureDigitalTwinsManagementClientImpl.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/AzureDigitalTwinsManagementClientImpl.java
new file mode 100644
index 0000000000000..262ef7d073f03
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/AzureDigitalTwinsManagementClientImpl.java
@@ -0,0 +1,984 @@
+/**
+ * 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_12_01.implementation;
+
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureClient;
+import com.microsoft.azure.AzureServiceClient;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.ErrorResponseException;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.PrivateEndpointConnectionProperties;
+import com.microsoft.rest.credentials.ServiceClientCredentials;
+import com.microsoft.rest.RestClient;
+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.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * Initializes a new instance of the AzureDigitalTwinsManagementClientImpl class.
+ */
+public class AzureDigitalTwinsManagementClientImpl extends AzureServiceClient {
+ /** The Retrofit service to perform REST calls. */
+ private AzureDigitalTwinsManagementClientService service;
+ /** 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-12-01";
+ 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);
+ initializeService();
+ }
+
+ /**
+ * 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-12-01");
+ }
+
+ private void initializeService() {
+ service = restClient().retrofit().create(AzureDigitalTwinsManagementClientService.class);
+ }
+
+ /**
+ * The interface defining all the services for AzureDigitalTwinsManagementClient to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface AzureDigitalTwinsManagementClientService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_12_01.AzureDigitalTwinsManagementClient getPrivateLinkResources" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateLinkResources")
+ Observable> getPrivateLinkResources(@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_12_01.AzureDigitalTwinsManagementClient getPrivateLinkResourceByResourceId" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateLinkResources/{resourceId}")
+ Observable> getPrivateLinkResourceByResourceId(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("resourceId") String resourceId, @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_12_01.AzureDigitalTwinsManagementClient getPrivateEndpointConnections" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections")
+ Observable> getPrivateEndpointConnections(@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_12_01.AzureDigitalTwinsManagementClient getPrivateEndpointConnectionByName" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ Observable> getPrivateEndpointConnectionByName(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @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_12_01.AzureDigitalTwinsManagementClient deletePrivateEndpointConnection" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", method = "DELETE", hasBody = true)
+ Observable> deletePrivateEndpointConnection(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @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_12_01.AzureDigitalTwinsManagementClient beginDeletePrivateEndpointConnection" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", method = "DELETE", hasBody = true)
+ Observable> beginDeletePrivateEndpointConnection(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @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_12_01.AzureDigitalTwinsManagementClient putPrivateEndpointConnection" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ Observable> putPrivateEndpointConnection(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body PrivateEndpointConnectionInner privateEndpointConnection, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.digitaltwins.v2020_12_01.AzureDigitalTwinsManagementClient beginPutPrivateEndpointConnection" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ Observable> beginPutPrivateEndpointConnection(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body PrivateEndpointConnectionInner privateEndpointConnection, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * List private link resources for given Digital Twin.
+ *
+ * @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 List<GroupIdInformationResponseInner> object if successful.
+ */
+ public List getPrivateLinkResources(String resourceGroupName, String resourceName) {
+ return getPrivateLinkResourcesWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body();
+ }
+
+ /**
+ * List private link resources for given Digital Twin.
+ *
+ * @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> getPrivateLinkResourcesAsync(String resourceGroupName, String resourceName, final ServiceCallback> serviceCallback) {
+ return ServiceFuture.fromResponse(getPrivateLinkResourcesWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback);
+ }
+
+ /**
+ * List private link resources for given Digital Twin.
+ *
+ * @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 List<GroupIdInformationResponseInner> object
+ */
+ public Observable> getPrivateLinkResourcesAsync(String resourceGroupName, String resourceName) {
+ return getPrivateLinkResourcesWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1>, List>() {
+ @Override
+ public List call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * List private link resources for given Digital Twin.
+ *
+ * @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 List<GroupIdInformationResponseInner> object
+ */
+ public Observable>> getPrivateLinkResourcesWithServiceResponseAsync(String resourceGroupName, String resourceName) {
+ if (this.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.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.getPrivateLinkResources(this.subscriptionId(), resourceGroupName, resourceName, this.apiVersion(), this.acceptLanguage(), this.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> clientResponse = getPrivateLinkResourcesDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> getPrivateLinkResourcesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Get the specified private link resource for the given Digital Twin.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param resourceId The name of the private link 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 GroupIdInformationInner object if successful.
+ */
+ public GroupIdInformationInner getPrivateLinkResourceByResourceId(String resourceGroupName, String resourceName, String resourceId) {
+ return getPrivateLinkResourceByResourceIdWithServiceResponseAsync(resourceGroupName, resourceName, resourceId).toBlocking().single().body();
+ }
+
+ /**
+ * Get the specified private link resource for the given Digital Twin.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param resourceId The name of the private link 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 getPrivateLinkResourceByResourceIdAsync(String resourceGroupName, String resourceName, String resourceId, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getPrivateLinkResourceByResourceIdWithServiceResponseAsync(resourceGroupName, resourceName, resourceId), serviceCallback);
+ }
+
+ /**
+ * Get the specified private link resource for the given Digital Twin.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param resourceId The name of the private link resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the GroupIdInformationInner object
+ */
+ public Observable getPrivateLinkResourceByResourceIdAsync(String resourceGroupName, String resourceName, String resourceId) {
+ return getPrivateLinkResourceByResourceIdWithServiceResponseAsync(resourceGroupName, resourceName, resourceId).map(new Func1, GroupIdInformationInner>() {
+ @Override
+ public GroupIdInformationInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get the specified private link resource for the given Digital Twin.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param resourceId The name of the private link resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the GroupIdInformationInner object
+ */
+ public Observable> getPrivateLinkResourceByResourceIdWithServiceResponseAsync(String resourceGroupName, String resourceName, String resourceId) {
+ if (this.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.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 (resourceId == null) {
+ throw new IllegalArgumentException("Parameter resourceId is required and cannot be null.");
+ }
+ return service.getPrivateLinkResourceByResourceId(this.subscriptionId(), resourceGroupName, resourceName, resourceId, this.apiVersion(), this.acceptLanguage(), this.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getPrivateLinkResourceByResourceIdDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getPrivateLinkResourceByResourceIdDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * List private endpoint connection properties.
+ *
+ * @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 List<PrivateEndpointConnectionInner> object if successful.
+ */
+ public List getPrivateEndpointConnections(String resourceGroupName, String resourceName) {
+ return getPrivateEndpointConnectionsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body();
+ }
+
+ /**
+ * List private endpoint connection properties.
+ *
+ * @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> getPrivateEndpointConnectionsAsync(String resourceGroupName, String resourceName, final ServiceCallback> serviceCallback) {
+ return ServiceFuture.fromResponse(getPrivateEndpointConnectionsWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback);
+ }
+
+ /**
+ * List private endpoint connection properties.
+ *
+ * @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 List<PrivateEndpointConnectionInner> object
+ */
+ public Observable> getPrivateEndpointConnectionsAsync(String resourceGroupName, String resourceName) {
+ return getPrivateEndpointConnectionsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1>, List>() {
+ @Override
+ public List call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * List private endpoint connection properties.
+ *
+ * @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 List<PrivateEndpointConnectionInner> object
+ */
+ public Observable>> getPrivateEndpointConnectionsWithServiceResponseAsync(String resourceGroupName, String resourceName) {
+ if (this.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.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.getPrivateEndpointConnections(this.subscriptionId(), resourceGroupName, resourceName, this.apiVersion(), this.acceptLanguage(), this.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> clientResponse = getPrivateEndpointConnectionsDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> getPrivateEndpointConnectionsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Get private endpoint connection properties for the given private endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 PrivateEndpointConnectionInner object if successful.
+ */
+ public PrivateEndpointConnectionInner getPrivateEndpointConnectionByName(String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ return getPrivateEndpointConnectionByNameWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName).toBlocking().single().body();
+ }
+
+ /**
+ * Get private endpoint connection properties for the given private endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 getPrivateEndpointConnectionByNameAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getPrivateEndpointConnectionByNameWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName), serviceCallback);
+ }
+
+ /**
+ * Get private endpoint connection properties for the given private endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PrivateEndpointConnectionInner object
+ */
+ public Observable getPrivateEndpointConnectionByNameAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ return getPrivateEndpointConnectionByNameWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName).map(new Func1, PrivateEndpointConnectionInner>() {
+ @Override
+ public PrivateEndpointConnectionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get private endpoint connection properties for the given private endpoint.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PrivateEndpointConnectionInner object
+ */
+ public Observable> getPrivateEndpointConnectionByNameWithServiceResponseAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ if (this.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.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 (privateEndpointConnectionName == null) {
+ throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null.");
+ }
+ return service.getPrivateEndpointConnectionByName(this.subscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, this.apiVersion(), this.acceptLanguage(), this.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getPrivateEndpointConnectionByNameDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getPrivateEndpointConnectionByNameDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Delete private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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
+ */
+ public void deletePrivateEndpointConnection(String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ deletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName).toBlocking().last().body();
+ }
+
+ /**
+ * Delete private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 deletePrivateEndpointConnectionAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName), serviceCallback);
+ }
+
+ /**
+ * Delete private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable deletePrivateEndpointConnectionAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ return deletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Delete private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> deletePrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ if (this.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.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 (privateEndpointConnectionName == null) {
+ throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null.");
+ }
+ Observable> observable = service.deletePrivateEndpointConnection(this.subscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, this.apiVersion(), this.acceptLanguage(), this.userAgent());
+ return getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Delete private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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
+ */
+ public void beginDeletePrivateEndpointConnection(String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ beginDeletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName).toBlocking().single().body();
+ }
+
+ /**
+ * Delete private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 beginDeletePrivateEndpointConnectionAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginDeletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName), serviceCallback);
+ }
+
+ /**
+ * Delete private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable beginDeletePrivateEndpointConnectionAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ return beginDeletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Delete private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> beginDeletePrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ if (this.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.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 (privateEndpointConnectionName == null) {
+ throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null.");
+ }
+ return service.beginDeletePrivateEndpointConnection(this.subscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, this.apiVersion(), this.acceptLanguage(), this.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginDeletePrivateEndpointConnectionDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginDeletePrivateEndpointConnectionDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter())
+ .register(202, new TypeToken() { }.getType())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Update the status of a private endpoint connection with the given name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param properties the PrivateEndpointConnectionProperties value
+ * @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 PrivateEndpointConnectionInner object if successful.
+ */
+ public PrivateEndpointConnectionInner putPrivateEndpointConnection(String resourceGroupName, String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionProperties properties) {
+ return putPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties).toBlocking().last().body();
+ }
+
+ /**
+ * Update the status of a private endpoint connection with the given name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param properties the PrivateEndpointConnectionProperties value
+ * @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 putPrivateEndpointConnectionAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionProperties properties, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(putPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties), serviceCallback);
+ }
+
+ /**
+ * Update the status of a private endpoint connection with the given name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param properties the PrivateEndpointConnectionProperties value
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable putPrivateEndpointConnectionAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionProperties properties) {
+ return putPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties).map(new Func1, PrivateEndpointConnectionInner>() {
+ @Override
+ public PrivateEndpointConnectionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Update the status of a private endpoint connection with the given name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param properties the PrivateEndpointConnectionProperties value
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> putPrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionProperties properties) {
+ if (this.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.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 (privateEndpointConnectionName == null) {
+ throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null.");
+ }
+ if (properties == null) {
+ throw new IllegalArgumentException("Parameter properties is required and cannot be null.");
+ }
+ Validator.validate(properties);
+ PrivateEndpointConnectionInner privateEndpointConnection = new PrivateEndpointConnectionInner();
+ privateEndpointConnection.withProperties(properties);
+ Observable> observable = service.putPrivateEndpointConnection(this.subscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, this.apiVersion(), this.acceptLanguage(), privateEndpointConnection, this.userAgent());
+ return getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Update the status of a private endpoint connection with the given name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param properties the PrivateEndpointConnectionProperties value
+ * @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 PrivateEndpointConnectionInner object if successful.
+ */
+ public PrivateEndpointConnectionInner beginPutPrivateEndpointConnection(String resourceGroupName, String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionProperties properties) {
+ return beginPutPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties).toBlocking().single().body();
+ }
+
+ /**
+ * Update the status of a private endpoint connection with the given name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param properties the PrivateEndpointConnectionProperties value
+ * @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 beginPutPrivateEndpointConnectionAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionProperties properties, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginPutPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties), serviceCallback);
+ }
+
+ /**
+ * Update the status of a private endpoint connection with the given name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param properties the PrivateEndpointConnectionProperties value
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PrivateEndpointConnectionInner object
+ */
+ public Observable beginPutPrivateEndpointConnectionAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionProperties properties) {
+ return beginPutPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties).map(new Func1, PrivateEndpointConnectionInner>() {
+ @Override
+ public PrivateEndpointConnectionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Update the status of a private endpoint connection with the given name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
+ * @param resourceName The name of the DigitalTwinsInstance.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param properties the PrivateEndpointConnectionProperties value
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PrivateEndpointConnectionInner object
+ */
+ public Observable> beginPutPrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionProperties properties) {
+ if (this.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.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 (privateEndpointConnectionName == null) {
+ throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null.");
+ }
+ if (properties == null) {
+ throw new IllegalArgumentException("Parameter properties is required and cannot be null.");
+ }
+ Validator.validate(properties);
+ PrivateEndpointConnectionInner privateEndpointConnection = new PrivateEndpointConnectionInner();
+ privateEndpointConnection.withProperties(properties);
+ return service.beginPutPrivateEndpointConnection(this.subscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, this.apiVersion(), this.acceptLanguage(), privateEndpointConnection, this.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginPutPrivateEndpointConnectionDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginPutPrivateEndpointConnectionDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/CheckNameResultImpl.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/CheckNameResultImpl.java
new file mode 100644
index 0000000000000..3a34db73d3d08
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01.implementation;
+
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.CheckNameResult;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/CheckNameResultInner.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/CheckNameResultInner.java
new file mode 100644
index 0000000000000..277ef42117c8d
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01.implementation;
+
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsDescriptionImpl.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsDescriptionImpl.java
new file mode 100644
index 0000000000000..583ed9626d275
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsDescriptionImpl.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_12_01.implementation;
+
+import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.DigitalTwinsDescription;
+import rx.Observable;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.DigitalTwinsPatchDescription;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.DigitalTwinsIdentity;
+import org.joda.time.DateTime;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.ProvisioningState;
+import java.util.List;
+import java.util.ArrayList;
+import rx.functions.Func1;
+
+class DigitalTwinsDescriptionImpl extends GroupableResourceCoreImpl implements DigitalTwinsDescription, DigitalTwinsDescription.Definition, DigitalTwinsDescription.Update {
+ private DigitalTwinsPatchDescription updateParameter;
+ DigitalTwinsDescriptionImpl(String name, DigitalTwinsDescriptionInner inner, DigitalTwinsManager manager) {
+ super(name, inner, manager);
+ this.updateParameter = new DigitalTwinsPatchDescription();
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ DigitalTwinsInner client = this.manager().inner().digitalTwins();
+ return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner())
+ .map(new Func1() {
+ @Override
+ public DigitalTwinsDescriptionInner call(DigitalTwinsDescriptionInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ DigitalTwinsInner client = this.manager().inner().digitalTwins();
+ return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter)
+ .map(new Func1() {
+ @Override
+ public DigitalTwinsDescriptionInner call(DigitalTwinsDescriptionInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .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;
+ }
+
+ private void resetCreateUpdateParameters() {
+ this.updateParameter = new DigitalTwinsPatchDescription();
+ }
+
+ @Override
+ public DateTime createdTime() {
+ return this.inner().createdTime();
+ }
+
+ @Override
+ public String hostName() {
+ return this.inner().hostName();
+ }
+
+ @Override
+ public DigitalTwinsIdentity identity() {
+ return this.inner().identity();
+ }
+
+ @Override
+ public DateTime lastUpdatedTime() {
+ return this.inner().lastUpdatedTime();
+ }
+
+ @Override
+ public List privateEndpointConnections() {
+ return this.inner().privateEndpointConnections();
+ }
+
+ @Override
+ public ProvisioningState provisioningState() {
+ return this.inner().provisioningState();
+ }
+
+ @Override
+ public DigitalTwinsDescriptionImpl withPrivateEndpointConnections(List privateEndpointConnections) {
+ this.inner().withPrivateEndpointConnections(privateEndpointConnections);
+ return this;
+ }
+
+ @Override
+ public DigitalTwinsDescriptionImpl withIdentity(DigitalTwinsIdentity identity) {
+ if (isInCreateMode()) {
+ this.inner().withIdentity(identity);
+ } else {
+ this.updateParameter.withIdentity(identity);
+ }
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsDescriptionInner.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsDescriptionInner.java
new file mode 100644
index 0000000000000..af951536c7447
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsDescriptionInner.java
@@ -0,0 +1,111 @@
+/**
+ * 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_12_01.implementation;
+
+import org.joda.time.DateTime;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.ProvisioningState;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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', 'Updating', '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;
+
+ /**
+ * The privateEndpointConnections property.
+ */
+ @JsonProperty(value = "properties.privateEndpointConnections")
+ private List privateEndpointConnections;
+
+ /**
+ * 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', 'Updating', '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;
+ }
+
+ /**
+ * Get the privateEndpointConnections value.
+ *
+ * @return the privateEndpointConnections value
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /**
+ * Set the privateEndpointConnections value.
+ *
+ * @param privateEndpointConnections the privateEndpointConnections value to set
+ * @return the DigitalTwinsDescriptionInner object itself.
+ */
+ public DigitalTwinsDescriptionInner withPrivateEndpointConnections(List privateEndpointConnections) {
+ this.privateEndpointConnections = privateEndpointConnections;
+ return this;
+ }
+
+}
diff --git a/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsEndpointResourceImpl.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsEndpointResourceImpl.java
new file mode 100644
index 0000000000000..2f208328fb161
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01.implementation;
+
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.DigitalTwinsEndpointResource;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsEndpointResourceInner.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsEndpointResourceInner.java
new file mode 100644
index 0000000000000..5ce37dac77aa6
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01.implementation;
+
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.DigitalTwinsEndpointResourceProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsEndpointsImpl.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsEndpointsImpl.java
new file mode 100644
index 0000000000000..3d5871ed9a3d6
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.DigitalTwinsEndpoints;
+import rx.Completable;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsEndpointsInner.java b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/implementation/DigitalTwinsEndpointsInner.java
new file mode 100644
index 0000000000000..49cc0334b6916
--- /dev/null
+++ b/sdk/digitaltwins/mgmt-v2020_12_01/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_12_01/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_12_01.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_12_01.DigitalTwinsEndpointResourceProperties;
+import com.microsoft.azure.management.digitaltwins.v2020_12_01.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_12_01.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_12_01.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_12_01.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_12_01.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_12_01.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_12_01.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_12_01.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