Skip to content

Commit

Permalink
CodeGen from PR 31689 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge b461f3d34706a46e6246f25f46f5cc30347bd817 into 4aad50a36767f7c36673f2c7982bb4055dbf5ed4
  • Loading branch information
SDKAuto committed Dec 1, 2024
1 parent 8b0eef6 commit 32cb6bc
Show file tree
Hide file tree
Showing 248 changed files with 472 additions and 7,257 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
# Release History

## 1.4.0-beta.1 (Unreleased)
## 1.0.0-beta.1 (2024-12-01)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
- Azure Resource Manager DataProtection client library for Java. This package contains Microsoft Azure SDK for DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection 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).

## 1.3.0 (2024-07-22)

Expand Down
53 changes: 19 additions & 34 deletions sdk/dataprotection/azure-resourcemanager-dataprotection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-dataprotection</artifactId>
<version>1.3.0</version>
<version>1.4.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -71,39 +71,24 @@ See [API design][design] for general introduction on design and key concepts on
## Examples

```java
resource = dataProtectionManager
.backupVaults()
.define(vaultName)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroupName)
.withProperties(
new BackupVault()
.withMonitoringSettings(
new MonitoringSettings()
.withAzureMonitorAlertSettings(
new AzureMonitorAlertSettings()
.withAlertsForAllJobFailures(AlertsState.ENABLED)))
.withSecuritySettings(
new SecuritySettings()
.withSoftDeleteSettings(
new SoftDeleteSettings()
.withState(SoftDeleteState.ALWAYS_ON)
.withRetentionDurationInDays(14.0D))
.withImmutabilitySettings(
new ImmutabilitySettings()
.withState(ImmutabilityState.LOCKED)))
.withStorageSettings(
Collections.singletonList(
new StorageSetting()
.withDatastoreType(StorageSettingStoreTypes.VAULT_STORE)
.withType(StorageSettingTypes.LOCALLY_REDUNDANT)))
.withFeatureSettings(
new FeatureSettings()
.withCrossSubscriptionRestoreSettings(
new CrossSubscriptionRestoreSettings()
.withState(CrossSubscriptionRestoreState.ENABLED))))
.withIdentity(new DppIdentityDetails().withType("systemAssigned"))
.create();
resource = dataProtectionManager.backupVaults()
.define(vaultName)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroupName)
.withProperties(new BackupVault()
.withMonitoringSettings(new MonitoringSettings().withAzureMonitorAlertSettings(
new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))
.withSecuritySettings(new SecuritySettings()
.withSoftDeleteSettings(new SoftDeleteSettings().withState(SoftDeleteState.ALWAYS_ON)
.withRetentionDurationInDays(14.0D))
.withImmutabilitySettings(new ImmutabilitySettings().withState(ImmutabilityState.LOCKED)))
.withStorageSettings(Collections
.singletonList(new StorageSetting().withDatastoreType(StorageSettingStoreTypes.VAULT_STORE)
.withType(StorageSettingTypes.LOCALLY_REDUNDANT)))
.withFeatureSettings(new FeatureSettings().withCrossSubscriptionRestoreSettings(
new CrossSubscriptionRestoreSettings().withState(CrossSubscriptionRestoreState.ENABLED))))
.withIdentity(new DppIdentityDetails().withType("systemAssigned"))
.create();
```
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ public final class BackupInstancesAdhocBackupSamples {
```java
import com.azure.resourcemanager.dataprotection.models.AzureOperationalStoreParameters;
import com.azure.resourcemanager.dataprotection.models.BackupInstance;
import com.azure.resourcemanager.dataprotection.models.DataStoreTypes;
import com.azure.resourcemanager.dataprotection.models.Datasource;
import com.azure.resourcemanager.dataprotection.models.DatasourceSet;
import com.azure.resourcemanager.dataprotection.models.DataStoreTypes;
import com.azure.resourcemanager.dataprotection.models.PolicyInfo;
import com.azure.resourcemanager.dataprotection.models.PolicyParameters;
import com.azure.resourcemanager.dataprotection.models.SecretStoreBasedAuthCredentials;
Expand Down
11 changes: 6 additions & 5 deletions sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,9 @@
<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>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.3.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
Expand All @@ -63,6 +59,11 @@
<artifactId>azure-core-management</artifactId>
<version>1.15.6</version> <!-- {x-version-update;com.azure:azure-core-management;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.3.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-test</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
Expand Down Expand Up @@ -289,7 +289,7 @@ public DataProtectionManager authenticate(TokenCredential credential, AzureProfi
.append("-")
.append("com.azure.resourcemanager.dataprotection")
.append("/")
.append("1.3.0");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
Expand Down Expand Up @@ -322,7 +322,7 @@ public DataProtectionManager authenticate(TokenCredential credential, AzureProfi
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@ public final class AzureBackupFindRestorableTimeRangesResponseResourceInner exte
private AzureBackupFindRestorableTimeRangesResponse properties;

/*
* Fully qualified resource Id for the resource.
* Metadata pertaining to creation and last modification of the resource.
*/
private String id;
private SystemData systemData;

/*
* The name of the resource.
* The type of the resource.
*/
private String name;
private String type;

/*
* The type of the resource.
* The name of the resource.
*/
private String type;
private String name;

/*
* Metadata pertaining to creation and last modification of the resource.
* Fully qualified resource Id for the resource.
*/
private SystemData systemData;
private String id;

/**
* Creates an instance of AzureBackupFindRestorableTimeRangesResponseResourceInner class.
Expand Down Expand Up @@ -71,43 +71,43 @@ public AzureBackupFindRestorableTimeRangesResponse properties() {
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the systemData property: Metadata pertaining to creation and last modification of the resource.
*
* @return the id value.
* @return the systemData value.
*/
@Override
public String id() {
return this.id;
public SystemData systemData() {
return this.systemData;
}

/**
* Get the name property: The name of the resource.
* Get the type property: The type of the resource.
*
* @return the name value.
* @return the type value.
*/
@Override
public String name() {
return this.name;
public String type() {
return this.type;
}

/**
* Get the type property: The type of the resource.
* Get the name property: The name of the resource.
*
* @return the type value.
* @return the name value.
*/
@Override
public String type() {
return this.type;
public String name() {
return this.name;
}

/**
* Get the systemData property: Metadata pertaining to creation and last modification of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the systemData value.
* @return the id value.
*/
@Override
public SystemData systemData() {
return this.systemData;
public String id() {
return this.id;
}

/**
Expand All @@ -117,7 +117,6 @@ public SystemData systemData() {
*/
@Override
public void validate() {
super.validate();
if (properties() != null) {
properties().validate();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@ public final class AzureBackupJobResourceInner extends DppResource {
private AzureBackupJob properties;

/*
* Fully qualified resource Id for the resource.
* Metadata pertaining to creation and last modification of the resource.
*/
private String id;
private SystemData systemData;

/*
* The name of the resource.
* The type of the resource.
*/
private String name;
private String type;

/*
* The type of the resource.
* The name of the resource.
*/
private String type;
private String name;

/*
* Metadata pertaining to creation and last modification of the resource.
* Fully qualified resource Id for the resource.
*/
private SystemData systemData;
private String id;

/**
* Creates an instance of AzureBackupJobResourceInner class.
Expand Down Expand Up @@ -70,43 +70,43 @@ public AzureBackupJobResourceInner withProperties(AzureBackupJob properties) {
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the systemData property: Metadata pertaining to creation and last modification of the resource.
*
* @return the id value.
* @return the systemData value.
*/
@Override
public String id() {
return this.id;
public SystemData systemData() {
return this.systemData;
}

/**
* Get the name property: The name of the resource.
* Get the type property: The type of the resource.
*
* @return the name value.
* @return the type value.
*/
@Override
public String name() {
return this.name;
public String type() {
return this.type;
}

/**
* Get the type property: The type of the resource.
* Get the name property: The name of the resource.
*
* @return the type value.
* @return the name value.
*/
@Override
public String type() {
return this.type;
public String name() {
return this.name;
}

/**
* Get the systemData property: Metadata pertaining to creation and last modification of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the systemData value.
* @return the id value.
*/
@Override
public SystemData systemData() {
return this.systemData;
public String id() {
return this.id;
}

/**
Expand All @@ -116,7 +116,6 @@ public SystemData systemData() {
*/
@Override
public void validate() {
super.validate();
if (properties() != null) {
properties().validate();
}
Expand Down
Loading

0 comments on commit 32cb6bc

Please sign in to comment.