Skip to content

Commit

Permalink
CodeGen from PR 31905 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 8bb3dce967dbe7fc08d11ec4ea874892d31bb4d5 into 57323ac6c745ba3af373dd1f62fa924e79fb828c
  • Loading branch information
SDKAuto committed Feb 28, 2025
1 parent 43c2834 commit be42e86
Show file tree
Hide file tree
Showing 383 changed files with 309 additions and 15,633 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# Release History

## 1.6.0-beta.1 (Unreleased)
## 1.0.0-beta.1 (2025-02-28)

- 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).

### Features Added

### Breaking Changes
#### `models.AzureFileShareRecoveryPoint` was modified

### Bugs Fixed
* `withRecoveryPointTierDetails(java.util.List)` was added
* `recoveryPointTierDetails()` was added

#### `models.AzureStorageContainer` was modified

### Other Changes
* `operationType()` was added
* `withOperationType(models.OperationType)` was added

## 1.5.0 (2024-12-19)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
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).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-recoveryservicesbackup</artifactId>
<version>1.5.0</version>
<version>1.6.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
RecoveryServicesBackupManager manager = RecoveryServicesBackupManager
.authenticate(credential, profile);
```

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

See [Authentication][authenticate] for more options.

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


Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for RecoveryServicesBackup Management</name>
<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>
<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>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand All @@ -45,6 +45,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryServicesBackupClient;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupEnginesImpl;
Expand Down Expand Up @@ -135,6 +136,7 @@
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;

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

private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
Expand Down Expand Up @@ -410,12 +415,14 @@ public RecoveryServicesBackupManager authenticate(TokenCredential credential, Az
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");

String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.recoveryservicesbackup")
.append("/")
.append("1.5.0");
.append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ public TieringCostOperationStatusClient getTieringCostOperationStatus() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
this.apiVersion = "2024-04-01";
this.apiVersion = "2024-10-01";
this.backupResourceStorageConfigsNonCrrs = new BackupResourceStorageConfigsNonCrrsClientImpl(this);
this.protectionIntents = new ProtectionIntentsClientImpl(this);
this.backupStatus = new BackupStatusClientImpl(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.io.IOException;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;

/**
* Azure File Share workload specific backup copy.
Expand Down Expand Up @@ -49,6 +50,11 @@ public final class AzureFileShareRecoveryPoint extends RecoveryPoint {
*/
private RecoveryPointProperties recoveryPointProperties;

/*
* Recovery point tier information.
*/
private List<RecoveryPointTierInformation> recoveryPointTierDetails;

/**
* Creates an instance of AzureFileShareRecoveryPoint class.
*/
Expand Down Expand Up @@ -168,6 +174,27 @@ public AzureFileShareRecoveryPoint withRecoveryPointProperties(RecoveryPointProp
return this;
}

/**
* Get the recoveryPointTierDetails property: Recovery point tier information.
*
* @return the recoveryPointTierDetails value.
*/
public List<RecoveryPointTierInformation> recoveryPointTierDetails() {
return this.recoveryPointTierDetails;
}

/**
* Set the recoveryPointTierDetails property: Recovery point tier information.
*
* @param recoveryPointTierDetails the recoveryPointTierDetails value to set.
* @return the AzureFileShareRecoveryPoint object itself.
*/
public AzureFileShareRecoveryPoint
withRecoveryPointTierDetails(List<RecoveryPointTierInformation> recoveryPointTierDetails) {
this.recoveryPointTierDetails = recoveryPointTierDetails;
return this;
}

/**
* Validates the instance.
*
Expand All @@ -178,6 +205,9 @@ public void validate() {
if (recoveryPointProperties() != null) {
recoveryPointProperties().validate();
}
if (recoveryPointTierDetails() != null) {
recoveryPointTierDetails().forEach(e -> e.validate());
}
}

/**
Expand All @@ -195,6 +225,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("fileShareSnapshotUri", this.fileShareSnapshotUri);
jsonWriter.writeNumberField("recoveryPointSizeInGB", this.recoveryPointSizeInGB);
jsonWriter.writeJsonField("recoveryPointProperties", this.recoveryPointProperties);
jsonWriter.writeArrayField("recoveryPointTierDetails", this.recoveryPointTierDetails,
(writer, element) -> writer.writeJson(element));
return jsonWriter.writeEndObject();
}

Expand Down Expand Up @@ -228,6 +260,10 @@ public static AzureFileShareRecoveryPoint fromJson(JsonReader jsonReader) throws
} else if ("recoveryPointProperties".equals(fieldName)) {
deserializedAzureFileShareRecoveryPoint.recoveryPointProperties
= RecoveryPointProperties.fromJson(reader);
} else if ("recoveryPointTierDetails".equals(fieldName)) {
List<RecoveryPointTierInformation> recoveryPointTierDetails
= reader.readArray(reader1 -> RecoveryPointTierInformation.fromJson(reader1));
deserializedAzureFileShareRecoveryPoint.recoveryPointTierDetails = recoveryPointTierDetails;
} else {
reader.skipChildren();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public final class AzureStorageContainer extends ProtectionContainer {
*/
private AcquireStorageAccountLock acquireStorageAccountLock;

/*
* Re-Do Operation
*/
private OperationType operationType;

/**
* Creates an instance of AzureStorageContainer class.
*/
Expand Down Expand Up @@ -171,6 +176,26 @@ public AzureStorageContainer withAcquireStorageAccountLock(AcquireStorageAccount
return this;
}

/**
* Get the operationType property: Re-Do Operation.
*
* @return the operationType value.
*/
public OperationType operationType() {
return this.operationType;
}

/**
* Set the operationType property: Re-Do Operation.
*
* @param operationType the operationType value to set.
* @return the AzureStorageContainer object itself.
*/
public AzureStorageContainer withOperationType(OperationType operationType) {
this.operationType = operationType;
return this;
}

/**
* {@inheritDoc}
*/
Expand Down Expand Up @@ -244,6 +269,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeNumberField("protectedItemCount", this.protectedItemCount);
jsonWriter.writeStringField("acquireStorageAccountLock",
this.acquireStorageAccountLock == null ? null : this.acquireStorageAccountLock.toString());
jsonWriter.writeStringField("operationType", this.operationType == null ? null : this.operationType.toString());
return jsonWriter.writeEndObject();
}

Expand Down Expand Up @@ -287,6 +313,8 @@ public static AzureStorageContainer fromJson(JsonReader jsonReader) throws IOExc
} else if ("acquireStorageAccountLock".equals(fieldName)) {
deserializedAzureStorageContainer.acquireStorageAccountLock
= AcquireStorageAccountLock.fromString(reader.getString());
} else if ("operationType".equals(fieldName)) {
deserializedAzureStorageContainer.operationType = OperationType.fromString(reader.getString());
} else {
reader.skipChildren();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public final class OperationType extends ExpandableStringEnum<OperationType> {
*/
public static final OperationType REREGISTER = fromString("Reregister");

/**
* Static value Rehydrate for OperationType.
*/
public static final OperationType REHYDRATE = fromString("Rehydrate");

/**
* Creates a new instance of OperationType value.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
@Fluent
public class ResourceList implements JsonSerializable<ResourceList> {
/*
* The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
* The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use
* ListNext() to fetch the next page if the total number of resources exceeds 200.
*/
private String nextLink;

Expand All @@ -28,8 +29,8 @@ public ResourceList() {
}

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

/**
* Set the nextLink property: The uri to fetch the next page of resources. Call ListNext() fetches next page of
* resources.
* Set the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200
* resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200.
*
* @param nextLink the nextLink value to set.
* @return the ResourceList object itself.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version=${project.version}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public final class BackupEnginesGetSamples {
/*
* x-ms-original-file:
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-04-01/examples/Dpm/
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-10-01/examples/Dpm/
* BackupEngines_Get.json
*/
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public final class BackupEnginesListSamples {
/*
* x-ms-original-file:
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-04-01/examples/Dpm/
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-10-01/examples/Dpm/
* BackupEngines_List.json
*/
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public final class BackupJobsListSamples {
/*
* x-ms-original-file:
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-04-01/examples/
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-10-01/examples/
* Common/ListJobs.json
*/
/**
Expand All @@ -25,7 +25,7 @@ public final class BackupJobsListSamples {

/*
* x-ms-original-file:
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-04-01/examples/
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-10-01/examples/
* Common/ListJobsWithAllSupportedFilters.json
*/
/**
Expand All @@ -43,7 +43,7 @@ public final class BackupJobsListSamples {

/*
* x-ms-original-file:
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-04-01/examples/
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-10-01/examples/
* Common/ListJobsWithStartTimeAndEndTimeFilters.json
*/
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public final class BackupOperationResultsGetSamples {
/*
* x-ms-original-file:
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-04-01/examples/
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-10-01/examples/
* Common/ProtectedItem_Delete_OperationResult.json
*/
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public final class BackupOperationStatusesGetSamples {
/*
* x-ms-original-file:
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-04-01/examples/
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-10-01/examples/
* Common/ProtectedItem_Delete_OperationStatus.json
*/
/**
Expand Down
Loading

0 comments on commit be42e86

Please sign in to comment.