Skip to content

Commit 84122ed

Browse files
author
SDKAuto
committed
CodeGen from PR 15259 in Azure/azure-rest-api-specs
Merge ef9fded91a00e96bc2f5f0efe4ad030b3cebbd7a into 647250fd29bf65ba6e5bf373b2594bd6ad5b0eda
1 parent 708fd3c commit 84122ed

File tree

223 files changed

+17767
-689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+17767
-689
lines changed

sdk/datamigration/azure-resourcemanager-datamigration/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Release History
22

3-
## 1.0.0-beta.2 (Unreleased)
3+
## 1.0.0-beta.1 (2021-08-13)
44

5+
- Azure Resource Manager DataMigration client library for Java. This package contains Microsoft Azure SDK for DataMigration Management SDK. Data Migration Client. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
56

67
## 1.0.0-beta.1 (2021-04-14)
78

sdk/datamigration/azure-resourcemanager-datamigration/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager DataMigration client library for Java.
44

5-
This package contains Microsoft Azure SDK for DataMigration Management SDK. Data Migration Client. Package tag package-2018-04-19. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
This package contains Microsoft Azure SDK for DataMigration Management SDK. Data Migration Client. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
## We'd love to hear your feedback
88

@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-datamigration</artifactId>
35-
<version>1.0.0-beta.1</version>
35+
<version>1.0.0-beta.2</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})
@@ -74,6 +74,8 @@ See [API design][design] for general introduction on design and key concepts on
7474

7575
## Examples
7676

77+
78+
7779
## Troubleshooting
7880

7981
## Next steps
Lines changed: 80 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,86 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2-
<modelVersion>4.0.0</modelVersion>
3-
<parent>
4-
<groupId>com.azure</groupId>
5-
<artifactId>azure-client-sdk-parent</artifactId>
6-
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
7-
<relativePath>../../parents/azure-client-sdk-parent</relativePath>
8-
</parent>
2+
<modelVersion>4.0.0</modelVersion>
3+
<parent>
4+
<groupId>com.azure</groupId>
5+
<artifactId>azure-client-sdk-parent</artifactId>
6+
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
7+
<relativePath>../../parents/azure-client-sdk-parent</relativePath>
8+
</parent>
99

10-
<groupId>com.azure.resourcemanager</groupId>
11-
<artifactId>azure-resourcemanager-datamigration</artifactId>
12-
<version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-datamigration;current} -->
13-
<packaging>jar</packaging>
10+
<groupId>com.azure.resourcemanager</groupId>
11+
<artifactId>azure-resourcemanager-datamigration</artifactId>
12+
<version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-datamigration;current} -->
13+
<packaging>jar</packaging>
1414

15-
<name>Microsoft Azure SDK for DataMigration Management</name>
16-
<description>This package contains Microsoft Azure SDK for DataMigration Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Data Migration Client. Package tag package-2018-04-19.</description>
17-
<url>https://github.com/Azure/azure-sdk-for-java</url>
15+
<name>Microsoft Azure SDK for DataMigration Management</name>
16+
<description>This package contains Microsoft Azure SDK for DataMigration Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Data Migration Client. Package tag package-2021-06.</description>
17+
<url>https://github.com/Azure/azure-sdk-for-java</url>
1818

19-
<licenses>
20-
<license>
21-
<name>The MIT License (MIT)</name>
22-
<url>http://opensource.org/licenses/MIT</url>
23-
<distribution>repo</distribution>
24-
</license>
25-
</licenses>
19+
<licenses>
20+
<license>
21+
<name>The MIT License (MIT)</name>
22+
<url>http://opensource.org/licenses/MIT</url>
23+
<distribution>repo</distribution>
24+
</license>
25+
</licenses>
2626

27-
<scm>
28-
<url>https://github.com/Azure/azure-sdk-for-java</url>
29-
<connection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</connection>
30-
<developerConnection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</developerConnection>
31-
<tag>HEAD</tag>
32-
</scm>
33-
<developers>
34-
<developer>
35-
<id>microsoft</id>
36-
<name>Microsoft</name>
37-
</developer>
38-
</developers>
39-
<properties>
40-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41-
<legal><![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
42-
</properties>
43-
<dependencies>
44-
<dependency>
45-
<groupId>com.azure</groupId>
46-
<artifactId>azure-core</artifactId>
47-
<version>1.19.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
48-
</dependency>
49-
<dependency>
50-
<groupId>com.azure</groupId>
51-
<artifactId>azure-core-management</artifactId>
52-
<version>1.4.0</version> <!-- {x-version-update;com.azure:azure-core-management;dependency} -->
53-
</dependency>
54-
</dependencies>
55-
<build>
56-
<plugins>
57-
<plugin>
58-
<groupId>org.jacoco</groupId>
59-
<artifactId>jacoco-maven-plugin</artifactId>
60-
<version>0.8.5</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
61-
<configuration>
62-
<skip>true</skip>
63-
</configuration>
64-
</plugin>
65-
</plugins>
66-
</build>
27+
<scm>
28+
<url>https://github.com/Azure/azure-sdk-for-java</url>
29+
<connection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</connection>
30+
<developerConnection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</developerConnection>
31+
<tag>HEAD</tag>
32+
</scm>
33+
<developers>
34+
<developer>
35+
<id>microsoft</id>
36+
<name>Microsoft</name>
37+
</developer>
38+
</developers>
39+
<properties>
40+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41+
<legal><![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
42+
</properties>
43+
<dependencies>
44+
<dependency>
45+
<groupId>com.azure</groupId>
46+
<artifactId>azure-core</artifactId>
47+
<version>1.19.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
48+
</dependency>
49+
<dependency>
50+
<groupId>com.azure</groupId>
51+
<artifactId>azure-core-management</artifactId>
52+
<version>1.4.0</version> <!-- {x-version-update;com.azure:azure-core-management;dependency} -->
53+
</dependency>
54+
</dependencies>
55+
<build>
56+
<plugins>
57+
<plugin>
58+
<groupId>org.jacoco</groupId>
59+
<artifactId>jacoco-maven-plugin</artifactId>
60+
<version>0.8.5</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
61+
<configuration>
62+
<skip>true</skip>
63+
</configuration>
64+
</plugin>
65+
<plugin>
66+
<groupId>org.revapi</groupId>
67+
<artifactId>revapi-maven-plugin</artifactId>
68+
<version>0.11.2</version> <!-- {x-version-update;org.revapi:revapi-maven-plugin;external_dependency} -->
69+
<configuration>
70+
<analysisConfiguration>
71+
<revapi.ignore>
72+
<item>
73+
<code>java.method.addedToInterface</code>
74+
</item>
75+
<item>
76+
<regex>true</regex>
77+
<code>.*</code>
78+
<package>com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*</package>
79+
</item>
80+
</revapi.ignore>
81+
</analysisConfiguration>
82+
</configuration>
83+
</plugin>
84+
</plugins>
85+
</build>
6786
</project>

sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/DataMigrationManager.java

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,32 @@
99
import com.azure.core.http.HttpPipeline;
1010
import com.azure.core.http.HttpPipelineBuilder;
1111
import com.azure.core.http.policy.AddDatePolicy;
12-
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
1312
import com.azure.core.http.policy.HttpLogOptions;
1413
import com.azure.core.http.policy.HttpLoggingPolicy;
1514
import com.azure.core.http.policy.HttpPipelinePolicy;
1615
import com.azure.core.http.policy.HttpPolicyProviders;
1716
import com.azure.core.http.policy.RequestIdPolicy;
1817
import com.azure.core.http.policy.RetryPolicy;
1918
import com.azure.core.http.policy.UserAgentPolicy;
19+
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
2020
import com.azure.core.management.profile.AzureProfile;
2121
import com.azure.core.util.Configuration;
2222
import com.azure.core.util.logging.ClientLogger;
2323
import com.azure.resourcemanager.datamigration.fluent.DataMigrationManagementClient;
2424
import com.azure.resourcemanager.datamigration.implementation.DataMigrationManagementClientBuilder;
25+
import com.azure.resourcemanager.datamigration.implementation.FilesImpl;
2526
import com.azure.resourcemanager.datamigration.implementation.OperationsImpl;
2627
import com.azure.resourcemanager.datamigration.implementation.ProjectsImpl;
2728
import com.azure.resourcemanager.datamigration.implementation.ResourceSkusImpl;
29+
import com.azure.resourcemanager.datamigration.implementation.ServiceTasksImpl;
2830
import com.azure.resourcemanager.datamigration.implementation.ServicesImpl;
2931
import com.azure.resourcemanager.datamigration.implementation.TasksImpl;
3032
import com.azure.resourcemanager.datamigration.implementation.UsagesImpl;
33+
import com.azure.resourcemanager.datamigration.models.Files;
3134
import com.azure.resourcemanager.datamigration.models.Operations;
3235
import com.azure.resourcemanager.datamigration.models.Projects;
3336
import com.azure.resourcemanager.datamigration.models.ResourceSkus;
37+
import com.azure.resourcemanager.datamigration.models.ServiceTasks;
3438
import com.azure.resourcemanager.datamigration.models.Services;
3539
import com.azure.resourcemanager.datamigration.models.Tasks;
3640
import com.azure.resourcemanager.datamigration.models.Usages;
@@ -48,12 +52,16 @@ public final class DataMigrationManager {
4852

4953
private Tasks tasks;
5054

55+
private ServiceTasks serviceTasks;
56+
5157
private Projects projects;
5258

5359
private Usages usages;
5460

5561
private Operations operations;
5662

63+
private Files files;
64+
5765
private final DataMigrationManagementClient clientObject;
5866

5967
private DataMigrationManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -97,6 +105,7 @@ public static final class Configurable {
97105
private HttpClient httpClient;
98106
private HttpLogOptions httpLogOptions;
99107
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
108+
private final List<String> scopes = new ArrayList<>();
100109
private RetryPolicy retryPolicy;
101110
private Duration defaultPollInterval;
102111

@@ -136,6 +145,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
136145
return this;
137146
}
138147

148+
/**
149+
* Adds the scope to permission sets.
150+
*
151+
* @param scope the scope.
152+
* @return the configurable object itself.
153+
*/
154+
public Configurable withScope(String scope) {
155+
this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
156+
return this;
157+
}
158+
139159
/**
140160
* Sets the retry policy to the HTTP pipeline.
141161
*
@@ -192,6 +212,9 @@ public DataMigrationManager authenticate(TokenCredential credential, AzureProfil
192212
userAgentBuilder.append(" (auto-generated)");
193213
}
194214

215+
if (scopes.isEmpty()) {
216+
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
217+
}
195218
if (retryPolicy == null) {
196219
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
197220
}
@@ -201,10 +224,7 @@ public DataMigrationManager authenticate(TokenCredential credential, AzureProfil
201224
HttpPolicyProviders.addBeforeRetryPolicies(policies);
202225
policies.add(retryPolicy);
203226
policies.add(new AddDatePolicy());
204-
policies
205-
.add(
206-
new BearerTokenAuthenticationPolicy(
207-
credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
227+
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
208228
policies.addAll(this.policies);
209229
HttpPolicyProviders.addAfterRetryPolicies(policies);
210230
policies.add(new HttpLoggingPolicy(httpLogOptions));
@@ -241,6 +261,14 @@ public Tasks tasks() {
241261
return tasks;
242262
}
243263

264+
/** @return Resource collection API of ServiceTasks. */
265+
public ServiceTasks serviceTasks() {
266+
if (this.serviceTasks == null) {
267+
this.serviceTasks = new ServiceTasksImpl(clientObject.getServiceTasks(), this);
268+
}
269+
return serviceTasks;
270+
}
271+
244272
/** @return Resource collection API of Projects. */
245273
public Projects projects() {
246274
if (this.projects == null) {
@@ -265,6 +293,14 @@ public Operations operations() {
265293
return operations;
266294
}
267295

296+
/** @return Resource collection API of Files. */
297+
public Files files() {
298+
if (this.files == null) {
299+
this.files = new FilesImpl(clientObject.getFiles(), this);
300+
}
301+
return files;
302+
}
303+
268304
/**
269305
* @return Wrapped service client DataMigrationManagementClient providing direct access to the underlying
270306
* auto-generated API implementation, based on Azure REST API.

sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DataMigrationManagementClient.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ public interface DataMigrationManagementClient {
6565
*/
6666
TasksClient getTasks();
6767

68+
/**
69+
* Gets the ServiceTasksClient object to access its operations.
70+
*
71+
* @return the ServiceTasksClient object.
72+
*/
73+
ServiceTasksClient getServiceTasks();
74+
6875
/**
6976
* Gets the ProjectsClient object to access its operations.
7077
*
@@ -85,4 +92,11 @@ public interface DataMigrationManagementClient {
8592
* @return the OperationsClient object.
8693
*/
8794
OperationsClient getOperations();
95+
96+
/**
97+
* Gets the FilesClient object to access its operations.
98+
*
99+
* @return the FilesClient object.
100+
*/
101+
FilesClient getFiles();
88102
}

0 commit comments

Comments
 (0)