Skip to content

Commit f672d30

Browse files
author
SDKAuto
committed
CodeGen from PR 16181 in Azure/azure-rest-api-specs
Merge e22738da02c088fdd09316b15f8218f7c905b408 into d2774322bc5be6fa35945e9c6004b8d34c451732
1 parent 46935e3 commit f672d30

File tree

54 files changed

+2028
-641
lines changed

Some content is hidden

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

54 files changed

+2028
-641
lines changed

sdk/logic/azure-resourcemanager-logic/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-10-05)
44

5+
- Azure Resource Manager Logic client library for Java. This package contains Microsoft Azure SDK for Logic Management SDK. REST API for Azure Logic Apps. Package tag package-2019-05. 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-16)
78

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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-logic</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-logic</artifactId>
12-
<version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-logic;current} -->
13-
<packaging>jar</packaging>
10+
<groupId>com.azure.resourcemanager</groupId>
11+
<artifactId>azure-resourcemanager-logic</artifactId>
12+
<version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-logic;current} -->
13+
<packaging>jar</packaging>
1414

15-
<name>Microsoft Azure SDK for Logic Management</name>
16-
<description>This package contains Microsoft Azure SDK for Logic Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure Logic Apps. Package tag package-2019-05.</description>
17-
<url>https://github.com/Azure/azure-sdk-for-java</url>
15+
<name>Microsoft Azure SDK for Logic Management</name>
16+
<description>This package contains Microsoft Azure SDK for Logic Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure Logic Apps. Package tag package-2019-05.</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.21.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.2</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.7</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.21.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.2</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.7</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/logic/azure-resourcemanager-logic/src/main/java/com/azure/resourcemanager/logic/LogicManager.java

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
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;
@@ -181,6 +181,7 @@ public static final class Configurable {
181181
private HttpClient httpClient;
182182
private HttpLogOptions httpLogOptions;
183183
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
184+
private final List<String> scopes = new ArrayList<>();
184185
private RetryPolicy retryPolicy;
185186
private Duration defaultPollInterval;
186187

@@ -220,6 +221,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
220221
return this;
221222
}
222223

224+
/**
225+
* Adds the scope to permission sets.
226+
*
227+
* @param scope the scope.
228+
* @return the configurable object itself.
229+
*/
230+
public Configurable withScope(String scope) {
231+
this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
232+
return this;
233+
}
234+
223235
/**
224236
* Sets the retry policy to the HTTP pipeline.
225237
*
@@ -276,6 +288,9 @@ public LogicManager authenticate(TokenCredential credential, AzureProfile profil
276288
userAgentBuilder.append(" (auto-generated)");
277289
}
278290

291+
if (scopes.isEmpty()) {
292+
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
293+
}
279294
if (retryPolicy == null) {
280295
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
281296
}
@@ -285,10 +300,7 @@ public LogicManager authenticate(TokenCredential credential, AzureProfile profil
285300
HttpPolicyProviders.addBeforeRetryPolicies(policies);
286301
policies.add(retryPolicy);
287302
policies.add(new AddDatePolicy());
288-
policies
289-
.add(
290-
new BearerTokenAuthenticationPolicy(
291-
credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
303+
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
292304
policies.addAll(this.policies);
293305
HttpPolicyProviders.addAfterRetryPolicies(policies);
294306
policies.add(new HttpLoggingPolicy(httpLogOptions));

sdk/logic/azure-resourcemanager-logic/src/main/java/com/azure/resourcemanager/logic/fluent/IntegrationServiceEnvironmentManagedApisClient.java

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import com.azure.core.management.polling.PollResult;
1212
import com.azure.core.util.Context;
1313
import com.azure.core.util.polling.SyncPoller;
14-
import com.azure.resourcemanager.logic.fluent.models.ManagedApiInner;
14+
import com.azure.resourcemanager.logic.fluent.models.IntegrationServiceEnvironmentManagedApiInner;
1515

1616
/**
1717
* An instance of this class provides access to all the operations defined in
@@ -29,7 +29,8 @@ public interface IntegrationServiceEnvironmentManagedApisClient {
2929
* @return the integration service environment managed Apis.
3030
*/
3131
@ServiceMethod(returns = ReturnType.COLLECTION)
32-
PagedIterable<ManagedApiInner> list(String resourceGroup, String integrationServiceEnvironmentName);
32+
PagedIterable<IntegrationServiceEnvironmentManagedApiInner> list(
33+
String resourceGroup, String integrationServiceEnvironmentName);
3334

3435
/**
3536
* Gets the integration service environment managed Apis.
@@ -43,7 +44,7 @@ public interface IntegrationServiceEnvironmentManagedApisClient {
4344
* @return the integration service environment managed Apis.
4445
*/
4546
@ServiceMethod(returns = ReturnType.COLLECTION)
46-
PagedIterable<ManagedApiInner> list(
47+
PagedIterable<IntegrationServiceEnvironmentManagedApiInner> list(
4748
String resourceGroup, String integrationServiceEnvironmentName, Context context);
4849

4950
/**
@@ -58,7 +59,8 @@ PagedIterable<ManagedApiInner> list(
5859
* @return the integration service environment managed Api.
5960
*/
6061
@ServiceMethod(returns = ReturnType.SINGLE)
61-
ManagedApiInner get(String resourceGroup, String integrationServiceEnvironmentName, String apiName);
62+
IntegrationServiceEnvironmentManagedApiInner get(
63+
String resourceGroup, String integrationServiceEnvironmentName, String apiName);
6264

6365
/**
6466
* Gets the integration service environment managed Api.
@@ -73,7 +75,7 @@ PagedIterable<ManagedApiInner> list(
7375
* @return the integration service environment managed Api.
7476
*/
7577
@ServiceMethod(returns = ReturnType.SINGLE)
76-
Response<ManagedApiInner> getWithResponse(
78+
Response<IntegrationServiceEnvironmentManagedApiInner> getWithResponse(
7779
String resourceGroup, String integrationServiceEnvironmentName, String apiName, Context context);
7880

7981
/**
@@ -82,60 +84,81 @@ Response<ManagedApiInner> getWithResponse(
8284
* @param resourceGroup The resource group name.
8385
* @param integrationServiceEnvironmentName The integration service environment name.
8486
* @param apiName The api name.
87+
* @param integrationServiceEnvironmentManagedApi The integration service environment managed api.
8588
* @throws IllegalArgumentException thrown if parameters fail the validation.
8689
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
8790
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
88-
* @return the managed api definition.
91+
* @return the integration service environment managed api.
8992
*/
9093
@ServiceMethod(returns = ReturnType.SINGLE)
91-
SyncPoller<PollResult<ManagedApiInner>, ManagedApiInner> beginPut(
92-
String resourceGroup, String integrationServiceEnvironmentName, String apiName);
94+
SyncPoller<PollResult<IntegrationServiceEnvironmentManagedApiInner>, IntegrationServiceEnvironmentManagedApiInner>
95+
beginPut(
96+
String resourceGroup,
97+
String integrationServiceEnvironmentName,
98+
String apiName,
99+
IntegrationServiceEnvironmentManagedApiInner integrationServiceEnvironmentManagedApi);
93100

94101
/**
95102
* Puts the integration service environment managed Api.
96103
*
97104
* @param resourceGroup The resource group name.
98105
* @param integrationServiceEnvironmentName The integration service environment name.
99106
* @param apiName The api name.
107+
* @param integrationServiceEnvironmentManagedApi The integration service environment managed api.
100108
* @param context The context to associate with this operation.
101109
* @throws IllegalArgumentException thrown if parameters fail the validation.
102110
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
103111
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
104-
* @return the managed api definition.
112+
* @return the integration service environment managed api.
105113
*/
106114
@ServiceMethod(returns = ReturnType.SINGLE)
107-
SyncPoller<PollResult<ManagedApiInner>, ManagedApiInner> beginPut(
108-
String resourceGroup, String integrationServiceEnvironmentName, String apiName, Context context);
115+
SyncPoller<PollResult<IntegrationServiceEnvironmentManagedApiInner>, IntegrationServiceEnvironmentManagedApiInner>
116+
beginPut(
117+
String resourceGroup,
118+
String integrationServiceEnvironmentName,
119+
String apiName,
120+
IntegrationServiceEnvironmentManagedApiInner integrationServiceEnvironmentManagedApi,
121+
Context context);
109122

110123
/**
111124
* Puts the integration service environment managed Api.
112125
*
113126
* @param resourceGroup The resource group name.
114127
* @param integrationServiceEnvironmentName The integration service environment name.
115128
* @param apiName The api name.
129+
* @param integrationServiceEnvironmentManagedApi The integration service environment managed api.
116130
* @throws IllegalArgumentException thrown if parameters fail the validation.
117131
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
118132
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
119-
* @return the managed api definition.
133+
* @return the integration service environment managed api.
120134
*/
121135
@ServiceMethod(returns = ReturnType.SINGLE)
122-
ManagedApiInner put(String resourceGroup, String integrationServiceEnvironmentName, String apiName);
136+
IntegrationServiceEnvironmentManagedApiInner put(
137+
String resourceGroup,
138+
String integrationServiceEnvironmentName,
139+
String apiName,
140+
IntegrationServiceEnvironmentManagedApiInner integrationServiceEnvironmentManagedApi);
123141

124142
/**
125143
* Puts the integration service environment managed Api.
126144
*
127145
* @param resourceGroup The resource group name.
128146
* @param integrationServiceEnvironmentName The integration service environment name.
129147
* @param apiName The api name.
148+
* @param integrationServiceEnvironmentManagedApi The integration service environment managed api.
130149
* @param context The context to associate with this operation.
131150
* @throws IllegalArgumentException thrown if parameters fail the validation.
132151
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
133152
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
134-
* @return the managed api definition.
153+
* @return the integration service environment managed api.
135154
*/
136155
@ServiceMethod(returns = ReturnType.SINGLE)
137-
ManagedApiInner put(
138-
String resourceGroup, String integrationServiceEnvironmentName, String apiName, Context context);
156+
IntegrationServiceEnvironmentManagedApiInner put(
157+
String resourceGroup,
158+
String integrationServiceEnvironmentName,
159+
String apiName,
160+
IntegrationServiceEnvironmentManagedApiInner integrationServiceEnvironmentManagedApi,
161+
Context context);
139162

140163
/**
141164
* Deletes the integration service environment managed Api.

0 commit comments

Comments
 (0)