Skip to content

Commit eb4f26e

Browse files
author
SDKAuto
committed
CodeGen from PR 33789 in Azure/azure-rest-api-specs
Merge 237e27fef51842edaf61fdadfcef2d035b5c928d into abb839b726184aa10f8d1eaac8e9fe590833619c
1 parent cbacda2 commit eb4f26e

File tree

386 files changed

+415
-15632
lines changed

Some content is hidden

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

386 files changed

+415
-15632
lines changed

sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/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.6.0-beta.1 (Unreleased)
3+
## 1.0.0-beta.1 (2025-04-08)
4+
5+
- Azure Resource Manager RecoveryServicesBackup client library for Java. This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2025-03-01. 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

7-
### Breaking Changes
9+
#### `models.AzureIaaSvmProtectedItem` was modified
10+
11+
* `policyType()` was added
812

9-
### Bugs Fixed
13+
#### `models.AzureFileShareRecoveryPoint` was modified
14+
15+
* `recoveryPointTierDetails()` was added
16+
* `withRecoveryPointTierDetails(java.util.List)` was added
17+
18+
#### `models.AzureStorageContainer` was modified
1019

11-
### Other Changes
20+
* `withOperationType(models.OperationType)` was added
21+
* `operationType()` was added
1222

1323
## 1.5.0 (2024-12-19)
1424

sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/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 RecoveryServicesBackup client library for Java.
44

5-
This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2024-04. 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 RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2025-03-01. 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
RecoveryServicesBackupManager manager = RecoveryServicesBackupManager
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

@@ -174,5 +174,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
174174
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
175175
[coc]: https://opensource.microsoft.com/codeofconduct/
176176
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
177-
178-

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

Lines changed: 140 additions & 104 deletions
Large diffs are not rendered by default.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<packaging>jar</packaging>
1919

2020
<name>Microsoft Azure SDK for RecoveryServicesBackup Management</name>
21-
<description>This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2024-04.</description>
21+
<description>This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2025-03-01.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>
@@ -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/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.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.recoveryservicesbackup.fluent.RecoveryServicesBackupClient;
2728
import com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupEnginesImpl;
@@ -135,6 +136,7 @@
135136
import java.time.temporal.ChronoUnit;
136137
import java.util.ArrayList;
137138
import java.util.List;
139+
import java.util.Map;
138140
import java.util.Objects;
139141
import java.util.stream.Collectors;
140142

@@ -303,6 +305,9 @@ public static Configurable configure() {
303305
*/
304306
public static final class Configurable {
305307
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
308+
private static final String SDK_VERSION = "version";
309+
private static final Map<String, String> PROPERTIES
310+
= CoreUtils.getProperties("azure-resourcemanager-recoveryservicesbackup.properties");
306311

307312
private HttpClient httpClient;
308313
private HttpLogOptions httpLogOptions;
@@ -410,12 +415,14 @@ public RecoveryServicesBackupManager authenticate(TokenCredential credential, Az
410415
Objects.requireNonNull(credential, "'credential' cannot be null.");
411416
Objects.requireNonNull(profile, "'profile' cannot be null.");
412417

418+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
419+
413420
StringBuilder userAgentBuilder = new StringBuilder();
414421
userAgentBuilder.append("azsdk-java")
415422
.append("-")
416423
.append("com.azure.resourcemanager.recoveryservicesbackup")
417424
.append("/")
418-
.append("1.5.0");
425+
.append(clientVersion);
419426
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
420427
userAgentBuilder.append(" (")
421428
.append(Configuration.getGlobalConfiguration().get("java.version"))

sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ public TieringCostOperationStatusClient getTieringCostOperationStatus() {
934934
this.defaultPollInterval = defaultPollInterval;
935935
this.subscriptionId = subscriptionId;
936936
this.endpoint = endpoint;
937-
this.apiVersion = "2024-04-01";
937+
this.apiVersion = "2025-03-01";
938938
this.backupResourceStorageConfigsNonCrrs = new BackupResourceStorageConfigsNonCrrsClientImpl(this);
939939
this.protectionIntents = new ProtectionIntentsClientImpl(this);
940940
this.backupStatus = new BackupStatusClientImpl(this);

sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareRecoveryPoint.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import java.io.IOException;
1313
import java.time.OffsetDateTime;
1414
import java.time.format.DateTimeFormatter;
15+
import java.util.List;
1516

1617
/**
1718
* Azure File Share workload specific backup copy.
@@ -49,6 +50,11 @@ public final class AzureFileShareRecoveryPoint extends RecoveryPoint {
4950
*/
5051
private RecoveryPointProperties recoveryPointProperties;
5152

53+
/*
54+
* Recovery point tier information.
55+
*/
56+
private List<RecoveryPointTierInformation> recoveryPointTierDetails;
57+
5258
/**
5359
* Creates an instance of AzureFileShareRecoveryPoint class.
5460
*/
@@ -168,6 +174,27 @@ public AzureFileShareRecoveryPoint withRecoveryPointProperties(RecoveryPointProp
168174
return this;
169175
}
170176

177+
/**
178+
* Get the recoveryPointTierDetails property: Recovery point tier information.
179+
*
180+
* @return the recoveryPointTierDetails value.
181+
*/
182+
public List<RecoveryPointTierInformation> recoveryPointTierDetails() {
183+
return this.recoveryPointTierDetails;
184+
}
185+
186+
/**
187+
* Set the recoveryPointTierDetails property: Recovery point tier information.
188+
*
189+
* @param recoveryPointTierDetails the recoveryPointTierDetails value to set.
190+
* @return the AzureFileShareRecoveryPoint object itself.
191+
*/
192+
public AzureFileShareRecoveryPoint
193+
withRecoveryPointTierDetails(List<RecoveryPointTierInformation> recoveryPointTierDetails) {
194+
this.recoveryPointTierDetails = recoveryPointTierDetails;
195+
return this;
196+
}
197+
171198
/**
172199
* Validates the instance.
173200
*
@@ -178,6 +205,9 @@ public void validate() {
178205
if (recoveryPointProperties() != null) {
179206
recoveryPointProperties().validate();
180207
}
208+
if (recoveryPointTierDetails() != null) {
209+
recoveryPointTierDetails().forEach(e -> e.validate());
210+
}
181211
}
182212

183213
/**
@@ -195,6 +225,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
195225
jsonWriter.writeStringField("fileShareSnapshotUri", this.fileShareSnapshotUri);
196226
jsonWriter.writeNumberField("recoveryPointSizeInGB", this.recoveryPointSizeInGB);
197227
jsonWriter.writeJsonField("recoveryPointProperties", this.recoveryPointProperties);
228+
jsonWriter.writeArrayField("recoveryPointTierDetails", this.recoveryPointTierDetails,
229+
(writer, element) -> writer.writeJson(element));
198230
return jsonWriter.writeEndObject();
199231
}
200232

@@ -228,6 +260,10 @@ public static AzureFileShareRecoveryPoint fromJson(JsonReader jsonReader) throws
228260
} else if ("recoveryPointProperties".equals(fieldName)) {
229261
deserializedAzureFileShareRecoveryPoint.recoveryPointProperties
230262
= RecoveryPointProperties.fromJson(reader);
263+
} else if ("recoveryPointTierDetails".equals(fieldName)) {
264+
List<RecoveryPointTierInformation> recoveryPointTierDetails
265+
= reader.readArray(reader1 -> RecoveryPointTierInformation.fromJson(reader1));
266+
deserializedAzureFileShareRecoveryPoint.recoveryPointTierDetails = recoveryPointTierDetails;
231267
} else {
232268
reader.skipChildren();
233269
}

sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMProtectedItem.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,8 @@ public static AzureIaaSClassicComputeVMProtectedItem fromJson(JsonReader jsonRea
402402
} else if ("extendedProperties".equals(fieldName)) {
403403
deserializedAzureIaaSClassicComputeVMProtectedItem
404404
.withExtendedProperties(ExtendedProperties.fromJson(reader));
405+
} else if ("policyType".equals(fieldName)) {
406+
deserializedAzureIaaSClassicComputeVMProtectedItem.withPolicyType(reader.getString());
405407
} else if ("protectedItemType".equals(fieldName)) {
406408
deserializedAzureIaaSClassicComputeVMProtectedItem.protectedItemType = reader.getString();
407409
} else {

sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMProtectedItem.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,8 @@ public static AzureIaaSComputeVMProtectedItem fromJson(JsonReader jsonReader) th
400400
} else if ("extendedProperties".equals(fieldName)) {
401401
deserializedAzureIaaSComputeVMProtectedItem
402402
.withExtendedProperties(ExtendedProperties.fromJson(reader));
403+
} else if ("policyType".equals(fieldName)) {
404+
deserializedAzureIaaSComputeVMProtectedItem.withPolicyType(reader.getString());
403405
} else if ("protectedItemType".equals(fieldName)) {
404406
deserializedAzureIaaSComputeVMProtectedItem.protectedItemType = reader.getString();
405407
} else {

sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectedItem.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ public class AzureIaaSvmProtectedItem extends ProtectedItem {
8585
*/
8686
private ExtendedProperties extendedProperties;
8787

88+
/*
89+
* Type of the policy used for protection
90+
*/
91+
private String policyType;
92+
8893
/**
8994
* Creates an instance of AzureIaaSvmProtectedItem class.
9095
*/
@@ -341,6 +346,26 @@ public AzureIaaSvmProtectedItem withExtendedProperties(ExtendedProperties extend
341346
return this;
342347
}
343348

349+
/**
350+
* Get the policyType property: Type of the policy used for protection.
351+
*
352+
* @return the policyType value.
353+
*/
354+
public String policyType() {
355+
return this.policyType;
356+
}
357+
358+
/**
359+
* Set the policyType property: Type of the policy used for protection.
360+
*
361+
* @param policyType the policyType value to set.
362+
* @return the AzureIaaSvmProtectedItem object itself.
363+
*/
364+
AzureIaaSvmProtectedItem withPolicyType(String policyType) {
365+
this.policyType = policyType;
366+
return this;
367+
}
368+
344369
/**
345370
* {@inheritDoc}
346371
*/
@@ -660,6 +685,8 @@ static AzureIaaSvmProtectedItem fromJsonKnownDiscriminator(JsonReader jsonReader
660685
= AzureIaaSvmProtectedItemExtendedInfo.fromJson(reader);
661686
} else if ("extendedProperties".equals(fieldName)) {
662687
deserializedAzureIaaSvmProtectedItem.extendedProperties = ExtendedProperties.fromJson(reader);
688+
} else if ("policyType".equals(fieldName)) {
689+
deserializedAzureIaaSvmProtectedItem.policyType = reader.getString();
663690
} else {
664691
reader.skipChildren();
665692
}

0 commit comments

Comments
 (0)