Skip to content

Commit f7b4f3a

Browse files
authored
Update the type of etag property to Azure.ETag type. (Azure#28292)
* Update the type of `etag` property to `Azure.ETag` type. * Add PrivateEndpoint test * Update API signature * Refine the tests and re-record * Update recording
1 parent b5ba873 commit f7b4f3a

31 files changed

+22621
-13110
lines changed

sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.netstandard2.0.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ protected MhsmPrivateEndpointConnectionCollection() { }
144144
public partial class MhsmPrivateEndpointConnectionData : Azure.ResourceManager.KeyVault.Models.KeyVaultTrackedResourceData
145145
{
146146
public MhsmPrivateEndpointConnectionData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { }
147-
public string Etag { get { throw null; } set { } }
147+
public Azure.ETag? Etag { get { throw null; } set { } }
148148
public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } }
149149
public Azure.ResourceManager.KeyVault.Models.MhsmPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } }
150150
public Azure.ResourceManager.KeyVault.Models.PrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } set { } }
@@ -187,7 +187,7 @@ protected PrivateEndpointConnectionCollection() { }
187187
public partial class PrivateEndpointConnectionData : Azure.ResourceManager.KeyVault.Models.KeyVaultResourceData
188188
{
189189
public PrivateEndpointConnectionData() { }
190-
public string Etag { get { throw null; } set { } }
190+
public Azure.ETag? Etag { get { throw null; } set { } }
191191
public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } }
192192
public Azure.ResourceManager.KeyVault.Models.PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } }
193193
public Azure.ResourceManager.KeyVault.Models.PrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } set { } }
@@ -576,7 +576,7 @@ public NetworkRuleSet() { }
576576
public partial class PrivateEndpointConnectionItem
577577
{
578578
internal PrivateEndpointConnectionItem() { }
579-
public string Etag { get { throw null; } }
579+
public Azure.ETag? Etag { get { throw null; } }
580580
public string Id { get { throw null; } }
581581
public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } }
582582
public Azure.ResourceManager.KeyVault.Models.PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } }

sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/MhsmPrivateEndpointConnectionData.cs

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/MhsmPrivateEndpointConnectionData.Serialization.cs

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/PrivateEndpointConnectionData.Serialization.cs

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/PrivateEndpointConnectionItem.Serialization.cs

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/PrivateEndpointConnectionItem.cs

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/PrivateEndpointConnectionData.cs

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/keyvault/Azure.ResourceManager.KeyVault/src/autorest.md

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ azure-arm: true
77
library-name: KeyVault
88
namespace: Azure.ResourceManager.KeyVault
99
tag: package-2021-10
10+
output-folder: Generated/
1011
clear-output-folder: true
1112
skip-csproj: true
1213
modelerfour:
@@ -49,40 +50,31 @@ directive:
4950
- from: swagger-document
5051
where: $.definitions.ManagedHsmSku.properties.family
5152
transform: delete $['x-ms-client-default']
52-
- from: swagger-document
53-
where: $.definitions.CheckNameAvailabilityResult.properties.reason
54-
transform: >
55-
$["x-ms-enum"] = {
56-
"modelAsString": false,
57-
"name": "NameAvailabilityReason"
58-
}
59-
- from: swagger-document
60-
where: $.definitions.Permissions.properties
61-
transform: >
62-
$.keys.items["x-ms-enum"]["name"] = "KeyPermission";
63-
$.secrets.items["x-ms-enum"]["name"] = "SecretPermission";
64-
$.certificates.items["x-ms-enum"]["name"] = "CertificatePermission";
65-
$.storage.items["x-ms-enum"]["name"] = "StoragePermission";
66-
- from: swagger-document
67-
where: "$.definitions.Resource"
68-
transform: >
69-
$["x-ms-client-name"] = "KeyVaultResourceData";
7053
- from: managedHsm.json
7154
where: "$.definitions"
7255
transform: >
7356
$.ManagedHsmResource["x-ms-client-name"] = "KeyVaultTrackedResourceData";
7457
$.MHSMIPRule.properties.value["x-ms-client-name"] = "AddressRange";
75-
$.ManagedHsmResource.properties.location["x-ms-format"] = "azure-location";
76-
$.DeletedManagedHsmProperties.properties.location["x-ms-format"] = "azure-location";
58+
$.ManagedHsmResource.properties.location["x-ms-format"] = "azure-location";
59+
$.DeletedManagedHsmProperties.properties.location["x-ms-format"] = "azure-location";
60+
$.MHSMPrivateEndpointConnection.properties.etag["x-ms-format"] = "etag";
7761
- from: keyvault.json
7862
where: "$.definitions"
7963
transform: >
64+
$.CheckNameAvailabilityResult.properties.reason["x-ms-enum"]["name"] = "NameAvailabilityReason";
65+
$.Permissions.properties.keys.items["x-ms-enum"]["name"] = "KeyPermission";
66+
$.Permissions.properties.secrets.items["x-ms-enum"]["name"] = "SecretPermission";
67+
$.Permissions.properties.certificates.items["x-ms-enum"]["name"] = "CertificatePermission";
68+
$.Permissions.properties.storage.items["x-ms-enum"]["name"] = "StoragePermission";
69+
$.Resource["x-ms-client-name"] = "KeyVaultResourceData";
8070
$.IPRule.properties.value["x-ms-client-name"] = "AddressRange";
8171
$.DeletedVaultProperties.properties.location["x-ms-format"] = "azure-location";
82-
$.VaultCreateOrUpdateParameters.properties.location["x-ms-format"] = "azure-location";
83-
$.VaultAccessPolicyParameters.properties.location["x-ms-format"] = "azure-location";
84-
$.Vault.properties.location["x-ms-format"] = "azure-location";
85-
$.Resource.properties.location["x-ms-format"] = "azure-location";
72+
$.VaultCreateOrUpdateParameters.properties.location["x-ms-format"] = "azure-location";
73+
$.VaultAccessPolicyParameters.properties.location["x-ms-format"] = "azure-location";
74+
$.Vault.properties.location["x-ms-format"] = "azure-location";
75+
$.Resource.properties.location["x-ms-format"] = "azure-location";
76+
$.PrivateEndpointConnectionItem.properties.etag["x-ms-format"] = "etag";
77+
$.PrivateEndpointConnection.properties.etag["x-ms-format"] = "etag";
8678
- rename-model:
8779
from: MHSMIPRule
8880
to: MhsmIPRule

sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Azure.ResourceManager.KeyVault.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
</PropertyGroup>
55
<ItemGroup>
66
<ProjectReference Include="..\src\Azure.ResourceManager.KeyVault.csproj" />
7+
<ProjectReference Include="..\..\..\network\Azure.ResourceManager.Network\src\Azure.ResourceManager.Network.csproj" />
78
</ItemGroup>
89
<ItemGroup>
910
<PackageReference Include="Azure.Identity" />

0 commit comments

Comments
 (0)