diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/CHANGELOG.md b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/CHANGELOG.md
index 5cb751e128d82..ea838227251c5 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/CHANGELOG.md
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.3 (Unreleased)
+## 1.0.0-beta.1 (2022-06-02)
+
+- Azure Resource Manager AzureDigitalTwins client library for Java. This package contains Microsoft Azure SDK for AzureDigitalTwins Management SDK. Azure Digital Twins Client for managing DigitalTwinsInstance. Package tag package-2021-06-30-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/README.md b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/README.md
index 146d6e087701c..a59f08dfa079f 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/README.md
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-digitaltwins
- 1.0.0-beta.2
+ 1.0.0-beta.3
```
[//]: # ({x-version-update-end})
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/AzureDigitalTwinsManager.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/AzureDigitalTwinsManager.java
index 9f339f17f37b0..0a08b043c0905 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/AzureDigitalTwinsManager.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/AzureDigitalTwinsManager.java
@@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
@@ -83,6 +85,19 @@ public static AzureDigitalTwinsManager authenticate(TokenCredential credential,
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of AzureDigitalTwins service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the AzureDigitalTwins service API instance.
+ */
+ public static AzureDigitalTwinsManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new AzureDigitalTwinsManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create AzureDigitalTwinsManager with optional configuration.
*
@@ -94,13 +109,14 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -161,6 +177,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -168,9 +197,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -192,7 +223,7 @@ public AzureDigitalTwinsManager authenticate(TokenCredential credential, AzurePr
.append("-")
.append("com.azure.resourcemanager.digitaltwins")
.append("/")
- .append("1.0.0-beta.2");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -210,10 +241,15 @@ public AzureDigitalTwinsManager authenticate(TokenCredential credential, AzurePr
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
@@ -244,7 +280,11 @@ public AzureDigitalTwinsManager authenticate(TokenCredential credential, AzurePr
}
}
- /** @return Resource collection API of DigitalTwins. */
+ /**
+ * Gets the resource collection API of DigitalTwins. It manages DigitalTwinsDescription.
+ *
+ * @return Resource collection API of DigitalTwins.
+ */
public DigitalTwins digitalTwins() {
if (this.digitalTwins == null) {
this.digitalTwins = new DigitalTwinsImpl(clientObject.getDigitalTwins(), this);
@@ -252,7 +292,11 @@ public DigitalTwins digitalTwins() {
return digitalTwins;
}
- /** @return Resource collection API of DigitalTwinsEndpoints. */
+ /**
+ * Gets the resource collection API of DigitalTwinsEndpoints. It manages DigitalTwinsEndpointResource.
+ *
+ * @return Resource collection API of DigitalTwinsEndpoints.
+ */
public DigitalTwinsEndpoints digitalTwinsEndpoints() {
if (this.digitalTwinsEndpoints == null) {
this.digitalTwinsEndpoints = new DigitalTwinsEndpointsImpl(clientObject.getDigitalTwinsEndpoints(), this);
@@ -260,7 +304,11 @@ public DigitalTwinsEndpoints digitalTwinsEndpoints() {
return digitalTwinsEndpoints;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -268,7 +316,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of PrivateLinkResources. */
+ /**
+ * Gets the resource collection API of PrivateLinkResources.
+ *
+ * @return Resource collection API of PrivateLinkResources.
+ */
public PrivateLinkResources privateLinkResources() {
if (this.privateLinkResources == null) {
this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
@@ -276,7 +328,11 @@ public PrivateLinkResources privateLinkResources() {
return privateLinkResources;
}
- /** @return Resource collection API of PrivateEndpointConnections. */
+ /**
+ * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection.
+ *
+ * @return Resource collection API of PrivateEndpointConnections.
+ */
public PrivateEndpointConnections privateEndpointConnections() {
if (this.privateEndpointConnections == null) {
this.privateEndpointConnections =
@@ -285,7 +341,11 @@ public PrivateEndpointConnections privateEndpointConnections() {
return privateEndpointConnections;
}
- /** @return Resource collection API of TimeSeriesDatabaseConnections. */
+ /**
+ * Gets the resource collection API of TimeSeriesDatabaseConnections. It manages TimeSeriesDatabaseConnection.
+ *
+ * @return Resource collection API of TimeSeriesDatabaseConnections.
+ */
public TimeSeriesDatabaseConnections timeSeriesDatabaseConnections() {
if (this.timeSeriesDatabaseConnections == null) {
this.timeSeriesDatabaseConnections =
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/CheckNameResultInner.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/CheckNameResultInner.java
index d12dc81074d7a..ade49c22bb103 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/CheckNameResultInner.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/CheckNameResultInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.digitaltwins.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.digitaltwins.models.Reason;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The result returned from a check name availability request. */
@Fluent
public final class CheckNameResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameResultInner.class);
-
/*
* Specifies a Boolean value that indicates if the name is available.
*/
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsDescriptionInner.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsDescriptionInner.java
index a26542f3ab6b0..8489debe96bdf 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsDescriptionInner.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsDescriptionInner.java
@@ -5,12 +5,10 @@
package com.azure.resourcemanager.digitaltwins.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsIdentity;
import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsResource;
import com.azure.resourcemanager.digitaltwins.models.ProvisioningState;
import com.azure.resourcemanager.digitaltwins.models.PublicNetworkAccess;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;
@@ -19,8 +17,6 @@
/** The description of the DigitalTwins service. */
@Fluent
public final class DigitalTwinsDescriptionInner extends DigitalTwinsResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DigitalTwinsDescriptionInner.class);
-
/*
* DigitalTwins instance properties.
*/
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsEndpointResourceInner.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsEndpointResourceInner.java
index dd15cc7146621..39acd6312325c 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsEndpointResourceInner.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsEndpointResourceInner.java
@@ -8,14 +8,11 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsEndpointResourceProperties;
import com.azure.resourcemanager.digitaltwins.models.ExternalResource;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** DigitalTwinsInstance endpoint resource. */
@Fluent
public final class DigitalTwinsEndpointResourceInner extends ExternalResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DigitalTwinsEndpointResourceInner.class);
-
/*
* DigitalTwinsInstance endpoint resource properties.
*/
@@ -51,7 +48,7 @@ public DigitalTwinsEndpointResourceInner withProperties(DigitalTwinsEndpointReso
public void validate() {
super.validate();
if (properties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property properties in model DigitalTwinsEndpointResourceInner"));
@@ -59,4 +56,6 @@ public void validate() {
properties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(DigitalTwinsEndpointResourceInner.class);
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsProperties.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsProperties.java
index 63c8ad1e27edc..fba37ee33acdc 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsProperties.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsProperties.java
@@ -5,10 +5,8 @@
package com.azure.resourcemanager.digitaltwins.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.digitaltwins.models.ProvisioningState;
import com.azure.resourcemanager.digitaltwins.models.PublicNetworkAccess;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;
@@ -16,8 +14,6 @@
/** The properties of a DigitalTwinsInstance. */
@Fluent
public final class DigitalTwinsProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DigitalTwinsProperties.class);
-
/*
* Time when DigitalTwinsInstance was created.
*/
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/GroupIdInformationInner.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/GroupIdInformationInner.java
index 84affdcc22031..394c5d84970ae 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/GroupIdInformationInner.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/GroupIdInformationInner.java
@@ -7,14 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.digitaltwins.models.GroupIdInformationProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The group information for creating a private endpoint on Digital Twin. */
@Fluent
public final class GroupIdInformationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(GroupIdInformationInner.class);
-
/*
* The group information properties.
*/
@@ -104,7 +101,7 @@ public String type() {
*/
public void validate() {
if (properties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property properties in model GroupIdInformationInner"));
@@ -112,4 +109,6 @@ public void validate() {
properties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(GroupIdInformationInner.class);
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/GroupIdInformationResponseInner.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/GroupIdInformationResponseInner.java
index edebf883bac20..fc9177f044fc8 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/GroupIdInformationResponseInner.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/GroupIdInformationResponseInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.digitaltwins.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The available private link resources for a Digital Twin. */
@Fluent
public final class GroupIdInformationResponseInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(GroupIdInformationResponseInner.class);
-
/*
* The list of available private link resources for a Digital Twin.
*/
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/OperationInner.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/OperationInner.java
index ac94705bc2c0b..c0fdcd50cd590 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/OperationInner.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/OperationInner.java
@@ -5,9 +5,7 @@
package com.azure.resourcemanager.digitaltwins.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.digitaltwins.models.OperationDisplay;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -15,8 +13,6 @@
/** DigitalTwins service REST API operation. */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* Operation name: {provider}/{resource}/{read | write | action | delete}
*/
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/PrivateEndpointConnectionInner.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/PrivateEndpointConnectionInner.java
index e5fe11340a51e..6178d7b2232f2 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/PrivateEndpointConnectionInner.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/PrivateEndpointConnectionInner.java
@@ -9,14 +9,11 @@
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.digitaltwins.models.ConnectionProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The private endpoint connection of a Digital Twin. */
@Fluent
public final class PrivateEndpointConnectionInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class);
-
/*
* The connection properties.
*/
@@ -67,7 +64,7 @@ public SystemData systemData() {
*/
public void validate() {
if (properties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property properties in model PrivateEndpointConnectionInner"));
@@ -75,4 +72,6 @@ public void validate() {
properties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionInner.class);
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/PrivateEndpointConnectionsResponseInner.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/PrivateEndpointConnectionsResponseInner.java
index a6c13db41c64f..ee3980f31d806 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/PrivateEndpointConnectionsResponseInner.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/PrivateEndpointConnectionsResponseInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.digitaltwins.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The available private link connections for a Digital Twin. */
@Fluent
public final class PrivateEndpointConnectionsResponseInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsResponseInner.class);
-
/*
* The list of available private link connections for a Digital Twin.
*/
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/TimeSeriesDatabaseConnectionInner.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/TimeSeriesDatabaseConnectionInner.java
index 6d326a53799d9..ba7a2d856cbc3 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/TimeSeriesDatabaseConnectionInner.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/TimeSeriesDatabaseConnectionInner.java
@@ -5,17 +5,13 @@
package com.azure.resourcemanager.digitaltwins.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.digitaltwins.models.ExternalResource;
import com.azure.resourcemanager.digitaltwins.models.TimeSeriesDatabaseConnectionProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Describes a time series database connection resource. */
@Fluent
public final class TimeSeriesDatabaseConnectionInner extends ExternalResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(TimeSeriesDatabaseConnectionInner.class);
-
/*
* Properties of a specific time series database connection.
*/
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/AzureDigitalTwinsManagementClientBuilder.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/AzureDigitalTwinsManagementClientBuilder.java
index b2b252faf55e0..c3ee2fe30fdf5 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/AzureDigitalTwinsManagementClientBuilder.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/AzureDigitalTwinsManagementClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -67,34 +66,34 @@ public AzureDigitalTwinsManagementClientBuilder environment(AzureEnvironment env
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the AzureDigitalTwinsManagementClientBuilder.
*/
- public AzureDigitalTwinsManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public AzureDigitalTwinsManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the AzureDigitalTwinsManagementClientBuilder.
*/
- public AzureDigitalTwinsManagementClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public AzureDigitalTwinsManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -126,15 +125,12 @@ public AzureDigitalTwinsManagementClientImpl buildClient() {
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/AzureDigitalTwinsManagementClientImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/AzureDigitalTwinsManagementClientImpl.java
index 444eb570c2fc7..d751eaeaeedf0 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/AzureDigitalTwinsManagementClientImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/AzureDigitalTwinsManagementClientImpl.java
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -34,15 +35,12 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the AzureDigitalTwinsManagementClientImpl type. */
@ServiceClient(builder = AzureDigitalTwinsManagementClientBuilder.class)
public final class AzureDigitalTwinsManagementClientImpl implements AzureDigitalTwinsManagementClient {
- private final ClientLogger logger = new ClientLogger(AzureDigitalTwinsManagementClientImpl.class);
-
/** The subscription identifier. */
private final String subscriptionId;
@@ -234,10 +232,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry