Skip to content

Commit e8a6dcb

Browse files
author
SDKAuto
committed
CodeGen from PR 33581 in Azure/azure-rest-api-specs
Merge efc5c09ac76420e669ba217b83c81ce263ad5453 into cb5ef7fc4cb443bd5f6b21d02cbce41051beb6ae
1 parent 41e7411 commit e8a6dcb

File tree

55 files changed

+442
-527
lines changed

Some content is hidden

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

55 files changed

+442
-527
lines changed

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
# Release History
22

3-
## 1.0.0-beta.3 (Unreleased)
3+
## 1.0.0-beta.3 (2025-04-15)
44

5-
### Features Added
5+
- Azure Resource Manager Edge Zones client library for Java. This package contains Microsoft Azure SDK for Edge Zones Management SDK. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
### Breaking Changes
88

9-
### Bugs Fixed
9+
#### `models.ExtendedZoneListResult` was removed
10+
11+
#### `models.OperationListResult` was removed
12+
13+
#### `EdgeZonesManager` was modified
14+
15+
* `fluent.MicrosoftEdgeZones serviceClient()` -> `fluent.EdgeZonesClient serviceClient()`
16+
17+
### Features Added
18+
19+
* `implementation.models.OperationListResult` was added
1020

11-
### Other Changes
21+
* `implementation.models.ExtendedZoneListResult` was added
1222

1323
## 1.0.0-beta.2 (2024-12-04)
1424

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

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

33
Azure Resource Manager Edge Zones client library for Java.
44

5-
This package contains Microsoft Azure SDK for Edge Zones Management SDK. Package tag package-2024-04-01-preview. 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 Edge Zones Management SDK. 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

@@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
5252
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
5353

5454
```java
55-
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
55+
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
5656
TokenCredential credential = new DefaultAzureCredentialBuilder()
5757
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
5858
.build();
5959
EdgeZonesManager manager = EdgeZonesManager
6060
.authenticate(credential, profile);
6161
```
6262

63-
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
63+
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
6464

6565
See [Authentication][authenticate] for more options.
6666

@@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
100100
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
101101
[coc]: https://opensource.microsoft.com/codeofconduct/
102102
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
103-
104-

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

Lines changed: 28 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,13 @@
1313
- [List](#operations_list)
1414
### ExtendedZones_Get
1515

16-
```java
17-
/**
18-
* Samples for ExtendedZones Get.
19-
*/
20-
public final class ExtendedZonesGetSamples {
21-
/*
22-
* x-ms-original-file:
23-
* specification/edgezones/resource-manager/Microsoft.EdgeZones/preview/2024-04-01-preview/examples/
24-
* ExtendedZones_Get.json
25-
*/
26-
/**
27-
* Sample code: GetExtendedZone.
28-
*
29-
* @param manager Entry point to EdgeZonesManager.
30-
*/
31-
public static void getExtendedZone(com.azure.resourcemanager.edgezones.EdgeZonesManager manager) {
32-
manager.extendedZones().getWithResponse("losangeles", com.azure.core.util.Context.NONE);
33-
}
34-
}
35-
```
36-
37-
### ExtendedZones_List
38-
3916
```java
4017
/**
4118
* Samples for ExtendedZones List.
4219
*/
4320
public final class ExtendedZonesListSamples {
4421
/*
45-
* x-ms-original-file:
46-
* specification/edgezones/resource-manager/Microsoft.EdgeZones/preview/2024-04-01-preview/examples/
47-
* ExtendedZones_ListBySubscription.json
22+
* x-ms-original-file: 2024-04-01-preview/ExtendedZones_ListBySubscription.json
4823
*/
4924
/**
5025
* Sample code: ListExtendedZones.
@@ -57,17 +32,15 @@ public final class ExtendedZonesListSamples {
5732
}
5833
```
5934

60-
### ExtendedZones_Register
35+
### ExtendedZones_List
6136

6237
```java
6338
/**
6439
* Samples for ExtendedZones Register.
6540
*/
6641
public final class ExtendedZonesRegisterSamples {
6742
/*
68-
* x-ms-original-file:
69-
* specification/edgezones/resource-manager/Microsoft.EdgeZones/preview/2024-04-01-preview/examples/
70-
* ExtendedZones_Register.json
43+
* x-ms-original-file: 2024-04-01-preview/ExtendedZones_Register.json
7144
*/
7245
/**
7346
* Sample code: RegisterExtendedZone.
@@ -80,17 +53,15 @@ public final class ExtendedZonesRegisterSamples {
8053
}
8154
```
8255

83-
### ExtendedZones_Unregister
56+
### ExtendedZones_Register
8457

8558
```java
8659
/**
8760
* Samples for ExtendedZones Unregister.
8861
*/
8962
public final class ExtendedZonesUnregisterSamples {
9063
/*
91-
* x-ms-original-file:
92-
* specification/edgezones/resource-manager/Microsoft.EdgeZones/preview/2024-04-01-preview/examples/
93-
* ExtendedZones_Unregister.json
64+
* x-ms-original-file: 2024-04-01-preview/ExtendedZones_Unregister.json
9465
*/
9566
/**
9667
* Sample code: UnregisterExtendedZone.
@@ -103,17 +74,15 @@ public final class ExtendedZonesUnregisterSamples {
10374
}
10475
```
10576

106-
### Operations_List
77+
### ExtendedZones_Unregister
10778

10879
```java
10980
/**
11081
* Samples for Operations List.
11182
*/
11283
public final class OperationsListSamples {
11384
/*
114-
* x-ms-original-file:
115-
* specification/edgezones/resource-manager/Microsoft.EdgeZones/preview/2024-04-01-preview/examples/Operations_List.
116-
* json
85+
* x-ms-original-file: 2024-04-01-preview/Operations_List.json
11786
*/
11887
/**
11988
* Sample code: ListOperations.
@@ -126,3 +95,24 @@ public final class OperationsListSamples {
12695
}
12796
```
12897

98+
### Operations_List
99+
100+
```java
101+
/**
102+
* Samples for ExtendedZones Get.
103+
*/
104+
public final class ExtendedZonesGetSamples {
105+
/*
106+
* x-ms-original-file: 2024-04-01-preview/ExtendedZones_Get.json
107+
*/
108+
/**
109+
* Sample code: GetExtendedZone.
110+
*
111+
* @param manager Entry point to EdgeZonesManager.
112+
*/
113+
public static void getExtendedZone(com.azure.resourcemanager.edgezones.EdgeZonesManager manager) {
114+
manager.extendedZones().getWithResponse("losangeles", com.azure.core.util.Context.NONE);
115+
}
116+
}
117+
```
118+

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
~ Copyright (c) Microsoft Corporation. All rights reserved.
33
~ Licensed under the MIT License.
4-
~ Code generated by Microsoft (R) AutoRest Code Generator.
4+
~ Code generated by Microsoft (R) TypeSpec Code Generator.
55
-->
66
<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">
77
<modelVersion>4.0.0</modelVersion>
@@ -18,7 +18,7 @@
1818
<packaging>jar</packaging>
1919

2020
<name>Microsoft Azure SDK for Edge Zones Management</name>
21-
<description>This package contains Microsoft Azure SDK for Edge Zones Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-04-01-preview.</description>
21+
<description>This package contains Microsoft Azure SDK for Edge Zones Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>
@@ -46,7 +46,6 @@
4646
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
4747
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
4848
<revapi.skip>true</revapi.skip>
49-
<spotless.skip>false</spotless.skip>
5049
</properties>
5150
<dependencies>
5251
<dependency>

sdk/edgezones/azure-resourcemanager-edgezones/src/main/java/com/azure/resourcemanager/edgezones/EdgeZonesManager.java

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
// Code generated by Microsoft (R) AutoRest Code Generator.
3+
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

55
package com.azure.resourcemanager.edgezones;
66

@@ -22,17 +22,19 @@
2222
import com.azure.core.http.policy.UserAgentPolicy;
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
25+
import com.azure.core.util.CoreUtils;
2526
import com.azure.core.util.logging.ClientLogger;
26-
import com.azure.resourcemanager.edgezones.fluent.MicrosoftEdgeZones;
27+
import com.azure.resourcemanager.edgezones.fluent.EdgeZonesClient;
28+
import com.azure.resourcemanager.edgezones.implementation.EdgeZonesClientBuilder;
2729
import com.azure.resourcemanager.edgezones.implementation.ExtendedZonesImpl;
28-
import com.azure.resourcemanager.edgezones.implementation.MicrosoftEdgeZonesBuilder;
2930
import com.azure.resourcemanager.edgezones.implementation.OperationsImpl;
3031
import com.azure.resourcemanager.edgezones.models.ExtendedZones;
3132
import com.azure.resourcemanager.edgezones.models.Operations;
3233
import java.time.Duration;
3334
import java.time.temporal.ChronoUnit;
3435
import java.util.ArrayList;
3536
import java.util.List;
37+
import java.util.Map;
3638
import java.util.Objects;
3739
import java.util.stream.Collectors;
3840

@@ -44,12 +46,12 @@ public final class EdgeZonesManager {
4446

4547
private ExtendedZones extendedZones;
4648

47-
private final MicrosoftEdgeZones clientObject;
49+
private final EdgeZonesClient clientObject;
4850

4951
private EdgeZonesManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
5052
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
5153
Objects.requireNonNull(profile, "'profile' cannot be null.");
52-
this.clientObject = new MicrosoftEdgeZonesBuilder().pipeline(httpPipeline)
54+
this.clientObject = new EdgeZonesClientBuilder().pipeline(httpPipeline)
5355
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
5456
.subscriptionId(profile.getSubscriptionId())
5557
.defaultPollInterval(defaultPollInterval)
@@ -96,6 +98,9 @@ public static Configurable configure() {
9698
*/
9799
public static final class Configurable {
98100
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
101+
private static final String SDK_VERSION = "version";
102+
private static final Map<String, String> PROPERTIES
103+
= CoreUtils.getProperties("azure-resourcemanager-edgezones.properties");
99104

100105
private HttpClient httpClient;
101106
private HttpLogOptions httpLogOptions;
@@ -203,12 +208,14 @@ public EdgeZonesManager authenticate(TokenCredential credential, AzureProfile pr
203208
Objects.requireNonNull(credential, "'credential' cannot be null.");
204209
Objects.requireNonNull(profile, "'profile' cannot be null.");
205210

211+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
212+
206213
StringBuilder userAgentBuilder = new StringBuilder();
207214
userAgentBuilder.append("azsdk-java")
208215
.append("-")
209216
.append("com.azure.resourcemanager.edgezones")
210217
.append("/")
211-
.append("1.0.0-beta.2");
218+
.append(clientVersion);
212219
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
213220
userAgentBuilder.append(" (")
214221
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -279,12 +286,12 @@ public ExtendedZones extendedZones() {
279286
}
280287

281288
/**
282-
* Gets wrapped service client MicrosoftEdgeZones providing direct access to the underlying auto-generated API
289+
* Gets wrapped service client EdgeZonesClient providing direct access to the underlying auto-generated API
283290
* implementation, based on Azure REST API.
284291
*
285-
* @return Wrapped service client MicrosoftEdgeZones.
292+
* @return Wrapped service client EdgeZonesClient.
286293
*/
287-
public MicrosoftEdgeZones serviceClient() {
294+
public EdgeZonesClient serviceClient() {
288295
return this.clientObject;
289296
}
290297
}
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
// Code generated by Microsoft (R) AutoRest Code Generator.
3+
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

55
package com.azure.resourcemanager.edgezones.fluent;
66

77
import com.azure.core.http.HttpPipeline;
88
import java.time.Duration;
99

1010
/**
11-
* The interface for MicrosoftEdgeZones class.
11+
* The interface for EdgeZonesClient class.
1212
*/
13-
public interface MicrosoftEdgeZones {
13+
public interface EdgeZonesClient {
1414
/**
15-
* Gets The ID of the target subscription. The value must be an UUID.
16-
*
17-
* @return the subscriptionId value.
18-
*/
19-
String getSubscriptionId();
20-
21-
/**
22-
* Gets server parameter.
15+
* Gets Service host.
2316
*
2417
* @return the endpoint value.
2518
*/
2619
String getEndpoint();
2720

2821
/**
29-
* Gets Api Version.
22+
* Gets Version parameter.
3023
*
3124
* @return the apiVersion value.
3225
*/
3326
String getApiVersion();
3427

28+
/**
29+
* Gets The ID of the target subscription. The value must be an UUID.
30+
*
31+
* @return the subscriptionId value.
32+
*/
33+
String getSubscriptionId();
34+
3535
/**
3636
* Gets The HTTP pipeline to send requests through.
3737
*

0 commit comments

Comments
 (0)