Skip to content

Commit 153695f

Browse files
author
SDKAuto
committed
CodeGen from PR 33639 in Azure/azure-rest-api-specs
Merge 9f20bf19f8c90a0ba5e6601b811910180399d2c7 into e53298c896c9c0b7af87d645a71b223fadea3f77
1 parent 3f1d7a8 commit 153695f

File tree

68 files changed

+19
-2624
lines changed

Some content is hidden

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

68 files changed

+19
-2624
lines changed

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

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

3-
## 1.1.0-beta.1 (Unreleased)
3+
## 1.0.0-beta.1 (2025-04-01)
44

5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
5+
- Azure Resource Manager reservations client library for Java. This package contains Microsoft Azure SDK for reservations Management SDK. This API describe Azure Reservation. Package tag package-2022-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
126

137
## 1.0.0 (2024-12-25)
148

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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
ReservationsManager manager = ReservationsManager
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/reservations/azure-resourcemanager-reservations/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4646
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
4747
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
48+
<revapi.skip>true</revapi.skip>
4849
<spotless.skip>false</spotless.skip>
4950
</properties>
5051
<dependencies>

sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/ReservationsManager.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
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;
2627
import com.azure.resourcemanager.reservations.fluent.AzureReservationApi;
2728
import com.azure.resourcemanager.reservations.implementation.AzureReservationApiBuilder;
@@ -49,6 +50,7 @@
4950
import java.time.temporal.ChronoUnit;
5051
import java.util.ArrayList;
5152
import java.util.List;
53+
import java.util.Map;
5254
import java.util.Objects;
5355
import java.util.stream.Collectors;
5456

@@ -128,6 +130,9 @@ public static Configurable configure() {
128130
*/
129131
public static final class Configurable {
130132
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
133+
private static final String SDK_VERSION = "version";
134+
private static final Map<String, String> PROPERTIES
135+
= CoreUtils.getProperties("azure-resourcemanager-reservations.properties");
131136

132137
private HttpClient httpClient;
133138
private HttpLogOptions httpLogOptions;
@@ -235,12 +240,14 @@ public ReservationsManager authenticate(TokenCredential credential, AzureProfile
235240
Objects.requireNonNull(credential, "'credential' cannot be null.");
236241
Objects.requireNonNull(profile, "'profile' cannot be null.");
237242

243+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
244+
238245
StringBuilder userAgentBuilder = new StringBuilder();
239246
userAgentBuilder.append("azsdk-java")
240247
.append("-")
241248
.append("com.azure.resourcemanager.reservations")
242249
.append("/")
243-
.append("1.0.0");
250+
.append(clientVersion);
244251
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
245252
userAgentBuilder.append(" (")
246253
.append(Configuration.getGlobalConfiguration().get("java.version"))

sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/ReservedResourceType.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ public final class ReservedResourceType extends ExpandableStringEnum<ReservedRes
141141
*/
142142
public static final ReservedResourceType VIRTUAL_MACHINE_SOFTWARE = fromString("VirtualMachineSoftware");
143143

144+
/**
145+
* Static value OpenAIPTU for ReservedResourceType.
146+
*/
147+
public static final ReservedResourceType OPEN_AIPTU = fromString("OpenAIPTU");
148+
144149
/**
145150
* Creates a new instance of ReservedResourceType value.
146151
*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version=${project.version}

sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedReservationListTests.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedReservationsInnerTests.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedReservationsPropertiesTests.java

Lines changed: 0 additions & 32 deletions
This file was deleted.

sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedScopePropertiesTests.java

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)