Skip to content

Commit 364ba77

Browse files
author
SDKAuto
committed
CodeGen from PR 17726 in Azure/azure-rest-api-specs
Merge 9f212f67c8ecbc5652496d4b31d085f94cb68b80 into 953526b78473a894d3f6f40263aa538874626155
1 parent ed95889 commit 364ba77

File tree

278 files changed

+13596
-2936
lines changed

Some content is hidden

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

278 files changed

+13596
-2936
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 (2022-03-01)
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: 4 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,9 @@ See [API design][design] for general introduction on design and key concepts on
7474

7575
## Examples
7676

77+
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/logic/azure-resourcemanager-logic/SAMPLE.md)
78+
79+
7780
## Troubleshooting
7881

7982
## Next steps

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

Lines changed: 3561 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
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-
<jacoco.skip>true</jacoco.skip>
42-
</properties>
43-
<dependencies>
44-
<dependency>
45-
<groupId>com.azure</groupId>
46-
<artifactId>azure-core</artifactId>
47-
<version>1.25.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.5.2</version> <!-- {x-version-update;com.azure:azure-core-management;dependency} -->
53-
</dependency>
54-
</dependencies>
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+
<jacoco.skip>true</jacoco.skip>
42+
</properties>
43+
<dependencies>
44+
<dependency>
45+
<groupId>com.azure</groupId>
46+
<artifactId>azure-core</artifactId>
47+
<version>1.25.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.5.2</version> <!-- {x-version-update;com.azure:azure-core-management;dependency} -->
53+
</dependency>
54+
</dependencies>
5555
</project>

sdk/logic/azure-resourcemanager-logic/src/main/java/com/azure/resourcemanager/logic/LogicManager.java

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88
import com.azure.core.http.HttpClient;
99
import com.azure.core.http.HttpPipeline;
1010
import com.azure.core.http.HttpPipelineBuilder;
11+
import com.azure.core.http.HttpPipelinePosition;
1112
import com.azure.core.http.policy.AddDatePolicy;
12-
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
1313
import com.azure.core.http.policy.HttpLogOptions;
1414
import com.azure.core.http.policy.HttpLoggingPolicy;
1515
import com.azure.core.http.policy.HttpPipelinePolicy;
1616
import com.azure.core.http.policy.HttpPolicyProviders;
1717
import com.azure.core.http.policy.RequestIdPolicy;
1818
import com.azure.core.http.policy.RetryPolicy;
1919
import com.azure.core.http.policy.UserAgentPolicy;
20+
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
2021
import com.azure.core.management.profile.AzureProfile;
2122
import com.azure.core.util.Configuration;
2223
import com.azure.core.util.logging.ClientLogger;
@@ -81,6 +82,7 @@
8182
import java.util.ArrayList;
8283
import java.util.List;
8384
import java.util.Objects;
85+
import java.util.stream.Collectors;
8486

8587
/** Entry point to LogicManager. REST API for Azure Logic Apps. */
8688
public final class LogicManager {
@@ -181,6 +183,7 @@ public static final class Configurable {
181183
private HttpClient httpClient;
182184
private HttpLogOptions httpLogOptions;
183185
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
186+
private final List<String> scopes = new ArrayList<>();
184187
private RetryPolicy retryPolicy;
185188
private Duration defaultPollInterval;
186189

@@ -220,6 +223,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
220223
return this;
221224
}
222225

226+
/**
227+
* Adds the scope to permission sets.
228+
*
229+
* @param scope the scope.
230+
* @return the configurable object itself.
231+
*/
232+
public Configurable withScope(String scope) {
233+
this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
234+
return this;
235+
}
236+
223237
/**
224238
* Sets the retry policy to the HTTP pipeline.
225239
*
@@ -276,20 +290,33 @@ public LogicManager authenticate(TokenCredential credential, AzureProfile profil
276290
userAgentBuilder.append(" (auto-generated)");
277291
}
278292

293+
if (scopes.isEmpty()) {
294+
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
295+
}
279296
if (retryPolicy == null) {
280297
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
281298
}
282299
List<HttpPipelinePolicy> policies = new ArrayList<>();
283300
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
284301
policies.add(new RequestIdPolicy());
302+
policies
303+
.addAll(
304+
this
305+
.policies
306+
.stream()
307+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
308+
.collect(Collectors.toList()));
285309
HttpPolicyProviders.addBeforeRetryPolicies(policies);
286310
policies.add(retryPolicy);
287311
policies.add(new AddDatePolicy());
312+
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
288313
policies
289-
.add(
290-
new BearerTokenAuthenticationPolicy(
291-
credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
292-
policies.addAll(this.policies);
314+
.addAll(
315+
this
316+
.policies
317+
.stream()
318+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
319+
.collect(Collectors.toList()));
293320
HttpPolicyProviders.addAfterRetryPolicies(policies);
294321
policies.add(new HttpLoggingPolicy(httpLogOptions));
295322
HttpPipeline httpPipeline =

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public interface IntegrationAccountAgreementsClient {
2323
* @throws IllegalArgumentException thrown if parameters fail the validation.
2424
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2525
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
26-
* @return a list of integration account agreements.
26+
* @return a list of integration account agreements as paginated response with {@link PagedIterable}.
2727
*/
2828
@ServiceMethod(returns = ReturnType.COLLECTION)
2929
PagedIterable<IntegrationAccountAgreementInner> list(String resourceGroupName, String integrationAccountName);
@@ -39,7 +39,7 @@ public interface IntegrationAccountAgreementsClient {
3939
* @throws IllegalArgumentException thrown if parameters fail the validation.
4040
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
4141
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
42-
* @return a list of integration account agreements.
42+
* @return a list of integration account agreements as paginated response with {@link PagedIterable}.
4343
*/
4444
@ServiceMethod(returns = ReturnType.COLLECTION)
4545
PagedIterable<IntegrationAccountAgreementInner> list(
@@ -69,7 +69,7 @@ PagedIterable<IntegrationAccountAgreementInner> list(
6969
* @throws IllegalArgumentException thrown if parameters fail the validation.
7070
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
7171
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
72-
* @return an integration account agreement.
72+
* @return an integration account agreement along with {@link Response}.
7373
*/
7474
@ServiceMethod(returns = ReturnType.SINGLE)
7575
Response<IntegrationAccountAgreementInner> getWithResponse(
@@ -105,7 +105,7 @@ IntegrationAccountAgreementInner createOrUpdate(
105105
* @throws IllegalArgumentException thrown if parameters fail the validation.
106106
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
107107
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
108-
* @return the integration account agreement.
108+
* @return the integration account agreement along with {@link Response}.
109109
*/
110110
@ServiceMethod(returns = ReturnType.SINGLE)
111111
Response<IntegrationAccountAgreementInner> createOrUpdateWithResponse(
@@ -138,7 +138,7 @@ Response<IntegrationAccountAgreementInner> createOrUpdateWithResponse(
138138
* @throws IllegalArgumentException thrown if parameters fail the validation.
139139
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
140140
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
141-
* @return the response.
141+
* @return the {@link Response}.
142142
*/
143143
@ServiceMethod(returns = ReturnType.SINGLE)
144144
Response<Void> deleteWithResponse(
@@ -174,7 +174,7 @@ WorkflowTriggerCallbackUrlInner listContentCallbackUrl(
174174
* @throws IllegalArgumentException thrown if parameters fail the validation.
175175
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
176176
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
177-
* @return the content callback url.
177+
* @return the content callback url along with {@link Response}.
178178
*/
179179
@ServiceMethod(returns = ReturnType.SINGLE)
180180
Response<WorkflowTriggerCallbackUrlInner> listContentCallbackUrlWithResponse(

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public interface IntegrationAccountAssembliesClient {
2222
* @throws IllegalArgumentException thrown if parameters fail the validation.
2323
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2424
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
25-
* @return a collection of assembly definitions.
25+
* @return a collection of assembly definitions as paginated response with {@link PagedIterable}.
2626
*/
2727
@ServiceMethod(returns = ReturnType.COLLECTION)
2828
PagedIterable<AssemblyDefinitionInner> list(String resourceGroupName, String integrationAccountName);
@@ -36,7 +36,7 @@ public interface IntegrationAccountAssembliesClient {
3636
* @throws IllegalArgumentException thrown if parameters fail the validation.
3737
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
3838
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
39-
* @return a collection of assembly definitions.
39+
* @return a collection of assembly definitions as paginated response with {@link PagedIterable}.
4040
*/
4141
@ServiceMethod(returns = ReturnType.COLLECTION)
4242
PagedIterable<AssemblyDefinitionInner> list(
@@ -66,7 +66,7 @@ PagedIterable<AssemblyDefinitionInner> list(
6666
* @throws IllegalArgumentException thrown if parameters fail the validation.
6767
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
6868
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
69-
* @return an assembly for an integration account.
69+
* @return an assembly for an integration account along with {@link Response}.
7070
*/
7171
@ServiceMethod(returns = ReturnType.SINGLE)
7272
Response<AssemblyDefinitionInner> getWithResponse(
@@ -102,7 +102,7 @@ AssemblyDefinitionInner createOrUpdate(
102102
* @throws IllegalArgumentException thrown if parameters fail the validation.
103103
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
104104
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
105-
* @return the assembly definition.
105+
* @return the assembly definition along with {@link Response}.
106106
*/
107107
@ServiceMethod(returns = ReturnType.SINGLE)
108108
Response<AssemblyDefinitionInner> createOrUpdateWithResponse(
@@ -135,7 +135,7 @@ Response<AssemblyDefinitionInner> createOrUpdateWithResponse(
135135
* @throws IllegalArgumentException thrown if parameters fail the validation.
136136
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
137137
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
138-
* @return the response.
138+
* @return the {@link Response}.
139139
*/
140140
@ServiceMethod(returns = ReturnType.SINGLE)
141141
Response<Void> deleteWithResponse(
@@ -166,7 +166,7 @@ WorkflowTriggerCallbackUrlInner listContentCallbackUrl(
166166
* @throws IllegalArgumentException thrown if parameters fail the validation.
167167
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
168168
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
169-
* @return the content callback url for an integration account assembly.
169+
* @return the content callback url for an integration account assembly along with {@link Response}.
170170
*/
171171
@ServiceMethod(returns = ReturnType.SINGLE)
172172
Response<WorkflowTriggerCallbackUrlInner> listContentCallbackUrlWithResponse(

0 commit comments

Comments
 (0)