Skip to content

Commit 331b3e6

Browse files
author
SDKAuto
committed
CodeGen from PR 26369 in Azure/azure-rest-api-specs
Merge 972c19d750923940753991a7045685e517d0ed57 into a032c2413b49d297196a0c64393e862433fccbb1
1 parent f8655ad commit 331b3e6

File tree

147 files changed

+1997
-6387
lines changed

Some content is hidden

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

147 files changed

+1997
-6387
lines changed

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

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

3-
## 1.0.0-beta.4 (Unreleased)
3+
## 1.0.0-beta.1 (2023-10-25)
4+
5+
- Azure Resource Manager ServiceFabric client library for Java. This package contains Microsoft Azure SDK for ServiceFabric Management SDK. Service Fabric Management 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).
46

57
### Features Added
68

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

Lines changed: 5 additions & 3 deletions
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-servicefabric</artifactId>
35-
<version>1.0.0-beta.3</version>
35+
<version>1.0.0-beta.4</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})
@@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
4545

4646
### Authentication
4747

48-
By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
48+
By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.
4949

5050
- `AZURE_CLIENT_ID` for Azure client ID.
5151
- `AZURE_TENANT_ID` for Azure tenant ID.
@@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
9494
<!-- LINKS -->
9595
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
9696
[docs]: https://azure.github.io/azure-sdk-for-java/
97-
[jdk]: https://docs.microsoft.com/java/azure/jdk/
97+
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
9898
[azure_subscription]: https://azure.microsoft.com/free/
9999
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
100100
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
@@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
103103
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
104104
[coc]: https://opensource.microsoft.com/codeofconduct/
105105
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
106+
107+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fservicefabric%2Fazure-resourcemanager-servicefabric%2FREADME.png)

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public final class ApplicationTypeVersionsCreateOrUpdateSamples {
7878
.create();
7979
}
8080

81+
// Use "Map.of" if available
8182
@SuppressWarnings("unchecked")
8283
private static <T> Map<String, T> mapOf(Object... inputs) {
8384
Map<String, T> map = new HashMap<>();
@@ -150,9 +151,7 @@ public final class ApplicationTypeVersionsListSamples {
150151
*/
151152
public static void getAListOfApplicationTypeVersionResources(
152153
com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
153-
manager
154-
.applicationTypeVersions()
155-
.listWithResponse("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE);
154+
manager.applicationTypeVersions().list("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE);
156155
}
157156
}
158157
```
@@ -182,6 +181,7 @@ public final class ApplicationTypesCreateOrUpdateSamples {
182181
.create();
183182
}
184183

184+
// Use "Map.of" if available
185185
@SuppressWarnings("unchecked")
186186
private static <T> Map<String, T> mapOf(Object... inputs) {
187187
Map<String, T> map = new HashMap<>();
@@ -248,7 +248,7 @@ public final class ApplicationTypesListSamples {
248248
*/
249249
public static void getAListOfApplicationTypeNameResources(
250250
com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
251-
manager.applicationTypes().listWithResponse("resRg", "myCluster", com.azure.core.util.Context.NONE);
251+
manager.applicationTypes().list("resRg", "myCluster", com.azure.core.util.Context.NONE);
252252
}
253253
}
254254
```
@@ -367,6 +367,7 @@ public final class ApplicationsCreateOrUpdateSamples {
367367
.create();
368368
}
369369

370+
// Use "Map.of" if available
370371
@SuppressWarnings("unchecked")
371372
private static <T> Map<String, T> mapOf(Object... inputs) {
372373
Map<String, T> map = new HashMap<>();
@@ -433,7 +434,7 @@ public final class ApplicationsListSamples {
433434
*/
434435
public static void getAListOfApplicationResources(
435436
com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
436-
manager.applications().listWithResponse("resRg", "myCluster", com.azure.core.util.Context.NONE);
437+
manager.applications().list("resRg", "myCluster", com.azure.core.util.Context.NONE);
437438
}
438439
}
439440
```
@@ -837,6 +838,7 @@ public final class ClustersCreateOrUpdateSamples {
837838
.create();
838839
}
839840

841+
// Use "Map.of" if available
840842
@SuppressWarnings("unchecked")
841843
private static <T> Map<String, T> mapOf(Object... inputs) {
842844
Map<String, T> map = new HashMap<>();
@@ -902,7 +904,7 @@ public final class ClustersListSamples {
902904
* @param manager Entry point to ServiceFabricManager.
903905
*/
904906
public static void listClusters(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
905-
manager.clusters().listWithResponse(com.azure.core.util.Context.NONE);
907+
manager.clusters().list(com.azure.core.util.Context.NONE);
906908
}
907909
}
908910
```
@@ -922,7 +924,7 @@ public final class ClustersListByResourceGroupSamples {
922924
*/
923925
public static void listClusterByResourceGroup(
924926
com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
925-
manager.clusters().listByResourceGroupWithResponse("resRg", com.azure.core.util.Context.NONE);
927+
manager.clusters().listByResourceGroup("resRg", com.azure.core.util.Context.NONE);
926928
}
927929
}
928930
```
@@ -1034,6 +1036,7 @@ public final class ClustersUpdateSamples {
10341036
.apply();
10351037
}
10361038

1039+
// Use "Map.of" if available
10371040
@SuppressWarnings("unchecked")
10381041
private static <T> Map<String, T> mapOf(Object... inputs) {
10391042
Map<String, T> map = new HashMap<>();
@@ -1146,6 +1149,7 @@ public final class ServicesCreateOrUpdateSamples {
11461149
.create();
11471150
}
11481151

1152+
// Use "Map.of" if available
11491153
@SuppressWarnings("unchecked")
11501154
private static <T> Map<String, T> mapOf(Object... inputs) {
11511155
Map<String, T> map = new HashMap<>();
@@ -1214,7 +1218,7 @@ public final class ServicesListSamples {
12141218
*/
12151219
public static void getAListOfServiceResources(
12161220
com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
1217-
manager.services().listWithResponse("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE);
1221+
manager.services().list("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE);
12181222
}
12191223
}
12201224
```

sdk/servicefabric/azure-resourcemanager-servicefabric/pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
~ Copyright (c) Microsoft Corporation. All rights reserved.
3+
~ Licensed under the MIT License.
4+
~ Code generated by Microsoft (R) AutoRest Code Generator.
5+
-->
16
<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">
27
<modelVersion>4.0.0</modelVersion>
38
<parent>
@@ -38,7 +43,9 @@
3843
</developers>
3944
<properties>
4045
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41-
<jacoco.skip>true</jacoco.skip>
46+
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
47+
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
48+
<revapi.skip>true</revapi.skip>
4249
</properties>
4350
<dependencies>
4451
<dependency>

sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/ServiceFabricManager.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public ServiceFabricManager authenticate(TokenCredential credential, AzureProfil
227227
.append("-")
228228
.append("com.azure.resourcemanager.servicefabric")
229229
.append("/")
230-
.append("1.0.0-beta.3");
230+
.append("1.0.0-beta.1");
231231
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
232232
userAgentBuilder
233233
.append(" (")
@@ -370,8 +370,10 @@ public Services services() {
370370
}
371371

372372
/**
373-
* @return Wrapped service client ServiceFabricManagementClient providing direct access to the underlying
374-
* auto-generated API implementation, based on Azure REST API.
373+
* Gets wrapped service client ServiceFabricManagementClient providing direct access to the underlying
374+
* auto-generated API implementation, based on Azure REST API.
375+
*
376+
* @return Wrapped service client ServiceFabricManagementClient.
375377
*/
376378
public ServiceFabricManagementClient serviceClient() {
377379
return this.clientObject;

sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationTypeVersionsClient.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
import com.azure.core.annotation.ReturnType;
88
import com.azure.core.annotation.ServiceMethod;
9+
import com.azure.core.http.rest.PagedIterable;
910
import com.azure.core.http.rest.Response;
1011
import com.azure.core.management.polling.PollResult;
1112
import com.azure.core.util.Context;
1213
import com.azure.core.util.polling.SyncPoller;
1314
import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeVersionResourceInner;
14-
import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeVersionResourceListInner;
1515

1616
/** An instance of this class provides access to all the operations defined in ApplicationTypeVersionsClient. */
1717
public interface ApplicationTypeVersionsClient {
@@ -237,16 +237,15 @@ void delete(
237237
* @param resourceGroupName The name of the resource group.
238238
* @param clusterName The name of the cluster resource.
239239
* @param applicationTypeName The name of the application type name resource.
240-
* @param context The context to associate with this operation.
241240
* @throws IllegalArgumentException thrown if parameters fail the validation.
242241
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
243242
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
244243
* @return all application type version resources created or in the process of being created in the Service Fabric
245-
* application type name resource along with {@link Response}.
244+
* application type name resource as paginated response with {@link PagedIterable}.
246245
*/
247-
@ServiceMethod(returns = ReturnType.SINGLE)
248-
Response<ApplicationTypeVersionResourceListInner> listWithResponse(
249-
String resourceGroupName, String clusterName, String applicationTypeName, Context context);
246+
@ServiceMethod(returns = ReturnType.COLLECTION)
247+
PagedIterable<ApplicationTypeVersionResourceInner> list(
248+
String resourceGroupName, String clusterName, String applicationTypeName);
250249

251250
/**
252251
* Gets the list of application type version resources created in the specified Service Fabric application type name
@@ -258,13 +257,14 @@ Response<ApplicationTypeVersionResourceListInner> listWithResponse(
258257
* @param resourceGroupName The name of the resource group.
259258
* @param clusterName The name of the cluster resource.
260259
* @param applicationTypeName The name of the application type name resource.
260+
* @param context The context to associate with this operation.
261261
* @throws IllegalArgumentException thrown if parameters fail the validation.
262262
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
263263
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
264264
* @return all application type version resources created or in the process of being created in the Service Fabric
265-
* application type name resource.
265+
* application type name resource as paginated response with {@link PagedIterable}.
266266
*/
267-
@ServiceMethod(returns = ReturnType.SINGLE)
268-
ApplicationTypeVersionResourceListInner list(
269-
String resourceGroupName, String clusterName, String applicationTypeName);
267+
@ServiceMethod(returns = ReturnType.COLLECTION)
268+
PagedIterable<ApplicationTypeVersionResourceInner> list(
269+
String resourceGroupName, String clusterName, String applicationTypeName, Context context);
270270
}

sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationTypesClient.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
import com.azure.core.annotation.ReturnType;
88
import com.azure.core.annotation.ServiceMethod;
9+
import com.azure.core.http.rest.PagedIterable;
910
import com.azure.core.http.rest.Response;
1011
import com.azure.core.management.polling.PollResult;
1112
import com.azure.core.util.Context;
1213
import com.azure.core.util.polling.SyncPoller;
1314
import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeResourceInner;
14-
import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeResourceListInner;
1515

1616
/** An instance of this class provides access to all the operations defined in ApplicationTypesClient. */
1717
public interface ApplicationTypesClient {
@@ -171,16 +171,14 @@ SyncPoller<PollResult<Void>, Void> beginDelete(
171171
*
172172
* @param resourceGroupName The name of the resource group.
173173
* @param clusterName The name of the cluster resource.
174-
* @param context The context to associate with this operation.
175174
* @throws IllegalArgumentException thrown if parameters fail the validation.
176175
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
177176
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
178177
* @return all application type name resources created or in the process of being created in the Service Fabric
179-
* cluster resource along with {@link Response}.
178+
* cluster resource as paginated response with {@link PagedIterable}.
180179
*/
181-
@ServiceMethod(returns = ReturnType.SINGLE)
182-
Response<ApplicationTypeResourceListInner> listWithResponse(
183-
String resourceGroupName, String clusterName, Context context);
180+
@ServiceMethod(returns = ReturnType.COLLECTION)
181+
PagedIterable<ApplicationTypeResourceInner> list(String resourceGroupName, String clusterName);
184182

185183
/**
186184
* Gets the list of application type name resources created in the specified Service Fabric cluster resource.
@@ -190,12 +188,13 @@ Response<ApplicationTypeResourceListInner> listWithResponse(
190188
*
191189
* @param resourceGroupName The name of the resource group.
192190
* @param clusterName The name of the cluster resource.
191+
* @param context The context to associate with this operation.
193192
* @throws IllegalArgumentException thrown if parameters fail the validation.
194193
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
195194
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
196195
* @return all application type name resources created or in the process of being created in the Service Fabric
197-
* cluster resource.
196+
* cluster resource as paginated response with {@link PagedIterable}.
198197
*/
199-
@ServiceMethod(returns = ReturnType.SINGLE)
200-
ApplicationTypeResourceListInner list(String resourceGroupName, String clusterName);
198+
@ServiceMethod(returns = ReturnType.COLLECTION)
199+
PagedIterable<ApplicationTypeResourceInner> list(String resourceGroupName, String clusterName, Context context);
201200
}

sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationsClient.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
import com.azure.core.annotation.ReturnType;
88
import com.azure.core.annotation.ServiceMethod;
9+
import com.azure.core.http.rest.PagedIterable;
910
import com.azure.core.http.rest.Response;
1011
import com.azure.core.management.polling.PollResult;
1112
import com.azure.core.util.Context;
1213
import com.azure.core.util.polling.SyncPoller;
1314
import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationResourceInner;
14-
import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationResourceListInner;
1515
import com.azure.resourcemanager.servicefabric.models.ApplicationResourceUpdate;
1616

1717
/** An instance of this class provides access to all the operations defined in ApplicationsClient. */
@@ -292,16 +292,14 @@ SyncPoller<PollResult<Void>, Void> beginDelete(
292292
*
293293
* @param resourceGroupName The name of the resource group.
294294
* @param clusterName The name of the cluster resource.
295-
* @param context The context to associate with this operation.
296295
* @throws IllegalArgumentException thrown if parameters fail the validation.
297296
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
298297
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
299298
* @return all application resources created or in the process of being created in the Service Fabric cluster
300-
* resource along with {@link Response}.
299+
* resource as paginated response with {@link PagedIterable}.
301300
*/
302-
@ServiceMethod(returns = ReturnType.SINGLE)
303-
Response<ApplicationResourceListInner> listWithResponse(
304-
String resourceGroupName, String clusterName, Context context);
301+
@ServiceMethod(returns = ReturnType.COLLECTION)
302+
PagedIterable<ApplicationResourceInner> list(String resourceGroupName, String clusterName);
305303

306304
/**
307305
* Gets the list of application resources created in the specified Service Fabric cluster resource.
@@ -311,12 +309,13 @@ Response<ApplicationResourceListInner> listWithResponse(
311309
*
312310
* @param resourceGroupName The name of the resource group.
313311
* @param clusterName The name of the cluster resource.
312+
* @param context The context to associate with this operation.
314313
* @throws IllegalArgumentException thrown if parameters fail the validation.
315314
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
316315
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
317316
* @return all application resources created or in the process of being created in the Service Fabric cluster
318-
* resource.
317+
* resource as paginated response with {@link PagedIterable}.
319318
*/
320-
@ServiceMethod(returns = ReturnType.SINGLE)
321-
ApplicationResourceListInner list(String resourceGroupName, String clusterName);
319+
@ServiceMethod(returns = ReturnType.COLLECTION)
320+
PagedIterable<ApplicationResourceInner> list(String resourceGroupName, String clusterName, Context context);
322321
}

0 commit comments

Comments
 (0)