Skip to content

Commit d92b34b

Browse files
author
SDKAuto
committed
CodeGen from PR 31905 in Azure/azure-rest-api-specs
Merge 5b3e208b0fc327452830f2d3300ca83d02f82260 into 5866dbbd59eac3a177da97031ca952aed0357689
1 parent 43c2834 commit d92b34b

File tree

383 files changed

+309
-15633
lines changed

Some content is hidden

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

383 files changed

+309
-15633
lines changed

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

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

3-
## 1.6.0-beta.1 (Unreleased)
3+
## 1.0.0-beta.1 (2025-02-28)
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-2024-10. 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.AzureFileShareRecoveryPoint` was modified
810

9-
### Bugs Fixed
11+
* `recoveryPointTierDetails()` was added
12+
* `withRecoveryPointTierDetails(java.util.List)` was added
13+
14+
#### `models.AzureStorageContainer` was modified
1015

11-
### Other Changes
16+
* `operationType()` was added
17+
* `withOperationType(models.OperationType)` was added
1218

1319
## 1.5.0 (2024-12-19)
1420

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

Lines changed: 4 additions & 6 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-2024-10. 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

@@ -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-recoveryservicesbackup</artifactId>
35-
<version>1.5.0</version>
35+
<version>1.6.0-beta.1</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})
@@ -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: 104 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-2024-10.</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 = "2024-10-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/AzureStorageContainer.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ public final class AzureStorageContainer extends ProtectionContainer {
4949
*/
5050
private AcquireStorageAccountLock acquireStorageAccountLock;
5151

52+
/*
53+
* Re-Do Operation
54+
*/
55+
private OperationType operationType;
56+
5257
/**
5358
* Creates an instance of AzureStorageContainer class.
5459
*/
@@ -171,6 +176,26 @@ public AzureStorageContainer withAcquireStorageAccountLock(AcquireStorageAccount
171176
return this;
172177
}
173178

179+
/**
180+
* Get the operationType property: Re-Do Operation.
181+
*
182+
* @return the operationType value.
183+
*/
184+
public OperationType operationType() {
185+
return this.operationType;
186+
}
187+
188+
/**
189+
* Set the operationType property: Re-Do Operation.
190+
*
191+
* @param operationType the operationType value to set.
192+
* @return the AzureStorageContainer object itself.
193+
*/
194+
public AzureStorageContainer withOperationType(OperationType operationType) {
195+
this.operationType = operationType;
196+
return this;
197+
}
198+
174199
/**
175200
* {@inheritDoc}
176201
*/
@@ -244,6 +269,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
244269
jsonWriter.writeNumberField("protectedItemCount", this.protectedItemCount);
245270
jsonWriter.writeStringField("acquireStorageAccountLock",
246271
this.acquireStorageAccountLock == null ? null : this.acquireStorageAccountLock.toString());
272+
jsonWriter.writeStringField("operationType", this.operationType == null ? null : this.operationType.toString());
247273
return jsonWriter.writeEndObject();
248274
}
249275

@@ -287,6 +313,8 @@ public static AzureStorageContainer fromJson(JsonReader jsonReader) throws IOExc
287313
} else if ("acquireStorageAccountLock".equals(fieldName)) {
288314
deserializedAzureStorageContainer.acquireStorageAccountLock
289315
= AcquireStorageAccountLock.fromString(reader.getString());
316+
} else if ("operationType".equals(fieldName)) {
317+
deserializedAzureStorageContainer.operationType = OperationType.fromString(reader.getString());
290318
} else {
291319
reader.skipChildren();
292320
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ public final class OperationType extends ExpandableStringEnum<OperationType> {
2626
*/
2727
public static final OperationType REREGISTER = fromString("Reregister");
2828

29+
/**
30+
* Static value Rehydrate for OperationType.
31+
*/
32+
public static final OperationType REHYDRATE = fromString("Rehydrate");
33+
2934
/**
3035
* Creates a new instance of OperationType value.
3136
*

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
@Fluent
1818
public class ResourceList implements JsonSerializable<ResourceList> {
1919
/*
20-
* The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
20+
* The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use
21+
* ListNext() to fetch the next page if the total number of resources exceeds 200.
2122
*/
2223
private String nextLink;
2324

@@ -28,8 +29,8 @@ public ResourceList() {
2829
}
2930

3031
/**
31-
* Get the nextLink property: The uri to fetch the next page of resources. Call ListNext() fetches next page of
32-
* resources.
32+
* Get the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200
33+
* resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200.
3334
*
3435
* @return the nextLink value.
3536
*/
@@ -38,8 +39,8 @@ public String nextLink() {
3839
}
3940

4041
/**
41-
* Set the nextLink property: The uri to fetch the next page of resources. Call ListNext() fetches next page of
42-
* resources.
42+
* Set the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200
43+
* resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200.
4344
*
4445
* @param nextLink the nextLink value to set.
4546
* @return the ResourceList object itself.

0 commit comments

Comments
 (0)