Skip to content

Commit 36fc9d1

Browse files
hiagaYao725
andauthored
track2 .NET SDK generation for dataprotection (Azure#33587)
* change the type of subscription id fix breaking changes and update api regen code based on latest swagger 2023-01-01 * added back DataStoreParametersList.Get() * regen code * added DataStoreParametersList EB.Never * Added changeLog * resolved review comments * update release date and changelog --------- Co-authored-by: Yao Kou <yaokou@microsoft.com>
1 parent 0e03e3b commit 36fc9d1

File tree

86 files changed

+3897
-379
lines changed

Some content is hidden

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

86 files changed

+3897
-379
lines changed

sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/CHANGELOG.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
# Release History
22

3-
## 1.1.0-beta.1 (Unreleased)
3+
## 1.1.0 (2023-02-03)
44

55
### Features Added
66

7-
### Breaking Changes
8-
9-
### Bugs Fixed
7+
- Added support for Immutable vaults.
8+
- Added support for Cross Subscription Restore.
9+
- Added support for AKS workload.
10+
- Added support for Soft Delete.
1011

1112
### Other Changes
1213

14+
- Changed API version from 2022-05-01 to 2023-01-01.
15+
1316
## 1.0.0 (2022-11-04)
1417

1518
This package is the first stable release of the Microsoft Azure Data Protection Backup management client library.

sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/api/Azure.ResourceManager.DataProtectionBackup.netstandard2.0.cs

Lines changed: 244 additions & 0 deletions
Large diffs are not rendered by default.

sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Azure.ResourceManager.DataProtectionBackup.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<Version>1.1.0-beta.1</Version>
3+
<Version>1.1.0</Version>
44
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
55
<ApiCompatVersion>1.0.0</ApiCompatVersion>
66
<PackageId>Azure.ResourceManager.DataProtectionBackup</PackageId>
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System;
7+
using System.ComponentModel;
8+
using System.Threading;
9+
using System.Threading.Tasks;
10+
using Azure.Core;
11+
using Azure.ResourceManager.DataProtectionBackup.Models;
12+
using Azure.ResourceManager.Resources;
13+
14+
namespace Azure.ResourceManager.DataProtectionBackup
15+
{
16+
/// <summary>
17+
/// A Class representing a DataProtectionBackupVault along with the instance operations that can be performed on it.
18+
/// If you have a <see cref="ResourceIdentifier" /> you can construct a <see cref="DataProtectionBackupVaultResource" />
19+
/// from an instance of <see cref="ArmClient" /> using the GetDataProtectionBackupVaultResource method.
20+
/// Otherwise you can get one from its parent resource <see cref="ResourceGroupResource" /> using the GetDataProtectionBackupVault method.
21+
/// </summary>
22+
public partial class DataProtectionBackupVaultResource
23+
{
24+
/// <summary>
25+
/// Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource.
26+
/// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}
27+
/// Operation Id: BackupVaults_Update
28+
/// </summary>
29+
/// <param name="waitUntil"> <see cref="WaitUntil.Completed"/> if the method should wait to return until the long-running operation has completed on the service; <see cref="WaitUntil.Started"/> if it should return after starting the operation. For more information on long-running operations, please see <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/LongRunningOperations.md"> Azure.Core Long-Running Operation samples</see>. </param>
30+
/// <param name="patch"> Request body for operation. </param>
31+
/// <param name="cancellationToken"> The cancellation token to use. </param>
32+
/// <exception cref="ArgumentNullException"> <paramref name="patch"/> is null. </exception>
33+
[Obsolete("This method is obsolete and will be removed in a future release. Please use UpdateAsync(WaitUntil waitUntil, DataProtectionBackupVaultPatch patch, CancellationToken cancellationToken = default) instead.", false)]
34+
[EditorBrowsable(EditorBrowsableState.Never)]
35+
[ForwardsClientCalls]
36+
public virtual async Task<ArmOperation<DataProtectionBackupVaultResource>> UpdateAsync(WaitUntil waitUntil, DataProtectionBackupPatch patch, CancellationToken cancellationToken = default)
37+
{
38+
DataProtectionBackupVaultPatch input = new DataProtectionBackupVaultPatch
39+
{
40+
Identity = patch.Identity,
41+
Properties = patch.Properties
42+
};
43+
foreach (var tag in patch.Tags)
44+
{
45+
input.Tags.Add(tag);
46+
}
47+
return await UpdateAsync(waitUntil, input, cancellationToken).ConfigureAwait(false);
48+
}
49+
/// <summary>
50+
/// Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource.
51+
/// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}
52+
/// Operation Id: BackupVaults_Update
53+
/// </summary>
54+
/// <param name="waitUntil"> <see cref="WaitUntil.Completed"/> if the method should wait to return until the long-running operation has completed on the service; <see cref="WaitUntil.Started"/> if it should return after starting the operation. For more information on long-running operations, please see <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/LongRunningOperations.md"> Azure.Core Long-Running Operation samples</see>. </param>
55+
/// <param name="patch"> Request body for operation. </param>
56+
/// <param name="cancellationToken"> The cancellation token to use. </param>
57+
/// <exception cref="ArgumentNullException"> <paramref name="patch"/> is null. </exception>
58+
[Obsolete("This method is obsolete and will be removed in a future release. Please use Update(WaitUntil waitUntil, DataProtectionBackupVaultPatch patch, CancellationToken cancellationToken = default) instead.", false)]
59+
[EditorBrowsable(EditorBrowsableState.Never)]
60+
[ForwardsClientCalls]
61+
public virtual ArmOperation<DataProtectionBackupVaultResource> Update(WaitUntil waitUntil, DataProtectionBackupPatch patch, CancellationToken cancellationToken = default)
62+
{
63+
DataProtectionBackupVaultPatch input = new DataProtectionBackupVaultPatch
64+
{
65+
Identity = patch.Identity,
66+
Properties = patch.Properties
67+
};
68+
foreach (var tag in patch.Tags)
69+
{
70+
input.Tags.Add(tag);
71+
}
72+
return Update(waitUntil, input, cancellationToken);
73+
}
74+
}
75+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System;
7+
using System.Collections.Generic;
8+
using System.ComponentModel;
9+
using Azure.Core;
10+
11+
namespace Azure.ResourceManager.DataProtectionBackup.Models
12+
{
13+
/// <summary> Policy Info in backupInstance. </summary>
14+
public partial class BackupInstancePolicyInfo
15+
{
16+
/// <summary>
17+
/// Gets or sets the DataStore Parameters
18+
/// Please note <see cref="DataStoreSettings"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
19+
/// The available derived classes include <see cref="OperationalDataStoreSettings"/>.
20+
/// Please note <see cref="DataStoreSettings"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
21+
/// The available derived classes include <see cref="OperationalDataStoreSettings"/>.
22+
/// </summary>
23+
[Obsolete("DataStoreParametersList is obsolete and will be removed in a future release. Please do not use it any longer.", false)]
24+
[EditorBrowsable(EditorBrowsableState.Never)]
25+
public IList<DataStoreSettings> DataStoreParametersList
26+
{
27+
get
28+
{
29+
if (PolicyParameters is null)
30+
PolicyParameters = new PolicyParameters();
31+
return PolicyParameters.DataStoreParametersList;
32+
}
33+
}
34+
}
35+
}

sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/Models/DataProtectionBackupPatch.cs renamed to sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Customized/Models/DataProtectionBackupPatch.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
// <auto-generated/>
5-
64
#nullable disable
75

6+
using System;
87
using System.Collections.Generic;
8+
using System.ComponentModel;
99
using Azure.Core;
1010
using Azure.ResourceManager.Models;
1111

1212
namespace Azure.ResourceManager.DataProtectionBackup.Models
1313
{
1414
/// <summary> Patch Request content for Microsoft.DataProtection resources. </summary>
15+
[Obsolete("DataProtectionBackupPatch is obsolete and will be removed in a future release. Please do not use it any longer.", false)]
16+
[EditorBrowsable(EditorBrowsableState.Never)]
1517
public partial class DataProtectionBackupPatch
1618
{
1719
/// <summary> Initializes a new instance of DataProtectionBackupPatch. </summary>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
namespace Azure.ResourceManager.DataProtectionBackup.Models
7+
{
8+
/// <summary> Backup Vault. </summary>
9+
public partial class DataProtectionBackupVaultProperties
10+
{
11+
/// <summary> Is vault protected by resource guard. </summary>
12+
public bool? IsVaultProtectedByResourceGuard { get; set; }
13+
}
14+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System;
7+
using System.ComponentModel;
8+
9+
namespace Azure.ResourceManager.DataProtectionBackup.Models
10+
{
11+
/// <summary> Gets or sets the type of the datastore. </summary>
12+
public readonly partial struct StorageSettingStoreType
13+
{
14+
private const string SnapshotStoreValue = "SnapshotStore";
15+
16+
/// <summary> SnapshotStore. </summary>
17+
[Obsolete("This property is obsolete and will be removed in a future release. Please do not use it any longer.", false)]
18+
[EditorBrowsable(EditorBrowsableState.Never)]
19+
public static StorageSettingStoreType SnapshotStore { get; } = new StorageSettingStoreType(SnapshotStoreValue);
20+
}
21+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System;
7+
using System.ComponentModel;
8+
using Azure.ResourceManager.Models;
9+
10+
namespace Azure.ResourceManager.DataProtectionBackup
11+
{
12+
/// <summary> A class representing the ResourceGuard data model. </summary>
13+
public partial class ResourceGuardData
14+
{
15+
/// <summary> Input Managed Identity Details. </summary>
16+
[Obsolete("This property is obsolete and will be removed in a future release. Please do not use it any longer.", false)]
17+
[EditorBrowsable(EditorBrowsableState.Never)]
18+
public ManagedServiceIdentity Identity { get; set; }
19+
}
20+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System;
7+
using System.ComponentModel;
8+
using System.Threading;
9+
using System.Threading.Tasks;
10+
using Azure.Core;
11+
using Azure.ResourceManager.DataProtectionBackup.Models;
12+
using Azure.ResourceManager.Resources;
13+
14+
namespace Azure.ResourceManager.DataProtectionBackup
15+
{
16+
/// <summary>
17+
/// A Class representing a ResourceGuard along with the instance operations that can be performed on it.
18+
/// If you have a <see cref="ResourceIdentifier" /> you can construct a <see cref="ResourceGuardResource" />
19+
/// from an instance of <see cref="ArmClient" /> using the GetResourceGuardResource method.
20+
/// Otherwise you can get one from its parent resource <see cref="ResourceGroupResource" /> using the GetResourceGuard method.
21+
/// </summary>
22+
public partial class ResourceGuardResource
23+
{
24+
/// <summary>
25+
/// Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource.
26+
/// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}
27+
/// Operation Id: ResourceGuards_Patch
28+
/// </summary>
29+
/// <param name="patch"> Request body for operation. </param>
30+
/// <param name="cancellationToken"> The cancellation token to use. </param>
31+
/// <exception cref="ArgumentNullException"> <paramref name="patch"/> is null. </exception>
32+
[Obsolete("This method is obsolete and will be removed in a future release. Please use UpdateAsync(ResourceGuardPatch patch, CancellationToken cancellationToken = default) instead.", false)]
33+
[EditorBrowsable(EditorBrowsableState.Never)]
34+
[ForwardsClientCalls]
35+
public virtual async Task<Response<ResourceGuardResource>> UpdateAsync(DataProtectionBackupPatch patch, CancellationToken cancellationToken = default)
36+
{
37+
ResourceGuardPatch input = new ResourceGuardPatch();
38+
foreach (var tag in patch.Tags)
39+
{
40+
input.Tags.Add(tag);
41+
}
42+
return await UpdateAsync(input, cancellationToken).ConfigureAwait(false);
43+
}
44+
45+
/// <summary>
46+
/// Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource.
47+
/// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}
48+
/// Operation Id: ResourceGuards_Patch
49+
/// </summary>
50+
/// <param name="patch"> Request body for operation. </param>
51+
/// <param name="cancellationToken"> The cancellation token to use. </param>
52+
/// <exception cref="ArgumentNullException"> <paramref name="patch"/> is null. </exception>
53+
[Obsolete("This method is obsolete and will be removed in a future release. Please use Update(ResourceGuardPatch patch, CancellationToken cancellationToken = default) instead.", false)]
54+
[EditorBrowsable(EditorBrowsableState.Never)]
55+
[ForwardsClientCalls]
56+
public virtual Response<ResourceGuardResource> Update(DataProtectionBackupPatch patch, CancellationToken cancellationToken = default)
57+
{
58+
ResourceGuardPatch input = new ResourceGuardPatch();
59+
foreach (var tag in patch.Tags)
60+
{
61+
input.Tags.Add(tag);
62+
}
63+
return Update(input, cancellationToken);
64+
}
65+
}
66+
}

0 commit comments

Comments
 (0)