From 3859ea27cf3689e8d7648eda30e31af70da0dbad Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Tue, 19 Nov 2024 07:54:39 +0000 Subject: [PATCH 1/5] Upgrade API spec version to 2023-06-01 --- .../Samples/Sample_MapsAccountCollection.cs | 74 +++++++- .../Samples/Sample_MapsAccountResource.cs | 72 ++++++-- .../Samples/Sample_MapsCreatorCollection.cs | 10 +- .../Samples/Sample_MapsCreatorResource.cs | 6 +- .../src/Generated/ArmMapsModelFactory.cs | 30 ++-- .../Generated/Extensions/MapsExtensions.cs | 8 +- .../MockableMapsResourceGroupResource.cs | 4 +- .../MockableMapsSubscriptionResource.cs | 4 +- .../src/Generated/MapsAccountCollection.cs | 20 +-- .../src/Generated/MapsAccountData.cs | 4 +- .../src/Generated/MapsAccountResource.cs | 40 ++--- .../src/Generated/MapsCreatorCollection.cs | 20 +-- .../src/Generated/MapsCreatorResource.cs | 24 +-- ...tomerManagedKeyEncryption.Serialization.cs | 148 ++++++++++++++++ .../Models/CustomerManagedKeyEncryption.cs | 69 ++++++++ ...dKeyEncryptionKeyIdentity.Serialization.cs | 163 ++++++++++++++++++ ...CustomerManagedKeyEncryptionKeyIdentity.cs | 74 ++++++++ .../Models/Encryption.Serialization.cs | 148 ++++++++++++++++ .../src/Generated/Models/Encryption.cs | 69 ++++++++ .../src/Generated/Models/IdentityType.cs | 54 ++++++ .../Models/InfrastructureEncryption.cs | 51 ++++++ .../Models/MapsAccountPatch.Serialization.cs | 16 ++ .../src/Generated/Models/MapsAccountPatch.cs | 23 ++- .../MapsAccountProperties.Serialization.cs | 16 ++ .../Generated/Models/MapsAccountProperties.cs | 19 +- .../Generated/Models/MapsAccountSasContent.cs | 18 +- .../src/Generated/Models/MapsSigningKey.cs | 5 +- .../RestOperations/AccountsRestOperations.cs | 2 +- .../RestOperations/CreatorsRestOperations.cs | 2 +- .../src/autorest.md | 2 +- 30 files changed, 1066 insertions(+), 129 deletions(-) create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryption.Serialization.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryption.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.Serialization.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.Serialization.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/IdentityType.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/InfrastructureEncryption.cs diff --git a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountCollection.cs b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountCollection.cs index 3bf262843bd12..2e1d5717acb90 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountCollection.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountCollection.cs @@ -18,11 +18,71 @@ namespace Azure.ResourceManager.Maps.Samples { public partial class Sample_MapsAccountCollection { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateAccountWithEncryption() + { + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/CreateAccountEncryption.json + // this example is just showing the usage of "Accounts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "21a9967a-e8a9-4656-a70b-96ff1c4d05a0"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MapsAccountResource + MapsAccountCollection collection = resourceGroupResource.GetMapsAccounts(); + + // invoke the operation + string accountName = "myMapsAccount"; + MapsAccountData data = new MapsAccountData(new AzureLocation("eastus"), new MapsSku(MapsSkuName.G2)) + { + Kind = MapsAccountKind.Gen2, + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName")] = new UserAssignedIdentity(), +}, + }, + Properties = new MapsAccountProperties() + { + Encryption = new Encryption() + { + CustomerManagedKeyEncryption = new CustomerManagedKeyEncryption() + { + KeyEncryptionKeyIdentity = new CustomerManagedKeyEncryptionKeyIdentity() + { + IdentityType = IdentityType.UserAssignedIdentity, + UserAssignedIdentityResourceId = new ResourceIdentifier("/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName"), + }, + KeyEncryptionKeyUri = new Uri("https://contosovault.vault.azure.net/keys/contosokek"), + }, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, data); + MapsAccountResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MapsAccountData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAccountWithManagedIdentities() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/CreateAccountManagedIdentity.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/CreateAccountManagedIdentity.json // this example is just showing the usage of "Accounts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +139,7 @@ public async Task CreateOrUpdate_CreateAccountWithManagedIdentities() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateGen1Account() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/CreateAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/CreateAccount.json // this example is just showing the usage of "Accounts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +192,7 @@ public async Task CreateOrUpdate_CreateGen1Account() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateGen2Account() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/CreateAccountGen2.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/CreateAccountGen2.json // this example is just showing the usage of "Accounts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -185,7 +245,7 @@ public async Task CreateOrUpdate_CreateGen2Account() [Ignore("Only validating compilation of examples")] public async Task Get_GetAccount() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/GetAccount.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -218,7 +278,7 @@ public async Task Get_GetAccount() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAccount() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/GetAccount.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -247,7 +307,7 @@ public async Task Exists_GetAccount() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAccount() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/GetAccount.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -288,7 +348,7 @@ public async Task GetIfExists_GetAccount() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAccountsByResourceGroup() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/ListAccountsByResourceGroup.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/ListAccountsByResourceGroup.json // this example is just showing the usage of "Accounts_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountResource.cs b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountResource.cs index 42f242b3950b0..97f21b6a43137 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountResource.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountResource.cs @@ -18,11 +18,63 @@ namespace Azure.ResourceManager.Maps.Samples { public partial class Sample_MapsAccountResource { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateAccountEncryption() + { + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountEncryption.json + // this example is just showing the usage of "Accounts_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MapsAccountResource created on azure + // for more information of creating MapsAccountResource, please refer to the document of MapsAccountResource + string subscriptionId = "21a9967a-e8a9-4656-a70b-96ff1c4d05a0"; + string resourceGroupName = "myResourceGroup"; + string accountName = "myMapsAccount"; + ResourceIdentifier mapsAccountResourceId = MapsAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + MapsAccountResource mapsAccount = client.GetMapsAccountResource(mapsAccountResourceId); + + // invoke the operation + MapsAccountPatch patch = new MapsAccountPatch() + { + Identity = new ManagedServiceIdentity("SystemAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName")] = null, +}, + }, + Encryption = new Encryption() + { + CustomerManagedKeyEncryption = new CustomerManagedKeyEncryption() + { + KeyEncryptionKeyIdentity = new CustomerManagedKeyEncryptionKeyIdentity() + { + IdentityType = IdentityType.SystemAssignedIdentity, + UserAssignedIdentityResourceId = null, + }, + KeyEncryptionKeyUri = new Uri("https://contosovault.vault.azure.net/keys/contosokek"), + }, + }, + }; + MapsAccountResource result = await mapsAccount.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MapsAccountData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAccountManagedIdentities() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/UpdateAccountManagedIdentity.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountManagedIdentity.json // this example is just showing the usage of "Accounts_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +120,7 @@ public async Task Update_UpdateAccountManagedIdentities() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAccountTags() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/UpdateAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccount.json // this example is just showing the usage of "Accounts_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -105,7 +157,7 @@ public async Task Update_UpdateAccountTags() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateToGen1Account() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/UpdateAccountGen1.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountGen1.json // this example is just showing the usage of "Accounts_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +192,7 @@ public async Task Update_UpdateToGen1Account() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateToGen2Account() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/UpdateAccountGen2.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountGen2.json // this example is just showing the usage of "Accounts_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +227,7 @@ public async Task Update_UpdateToGen2Account() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAccount() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/DeleteAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/DeleteAccount.json // this example is just showing the usage of "Accounts_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -201,7 +253,7 @@ public async Task Delete_DeleteAccount() [Ignore("Only validating compilation of examples")] public async Task Get_GetAccount() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/GetAccount.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -231,7 +283,7 @@ public async Task Get_GetAccount() [Ignore("Only validating compilation of examples")] public async Task GetMapsAccounts_ListAccountsBySubscription() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/ListAccountsBySubscription.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/ListAccountsBySubscription.json // this example is just showing the usage of "Accounts_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -262,7 +314,7 @@ public async Task GetMapsAccounts_ListAccountsBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetSas_ListAccountSas() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/AccountListSAS.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/AccountListSAS.json // this example is just showing the usage of "Accounts_ListSas" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -295,7 +347,7 @@ public async Task GetSas_ListAccountSas() [Ignore("Only validating compilation of examples")] public async Task GetKeys_ListKeys() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/ListKeys.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/ListKeys.json // this example is just showing the usage of "Accounts_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -321,7 +373,7 @@ public async Task GetKeys_ListKeys() [Ignore("Only validating compilation of examples")] public async Task RegenerateKeys_RegenerateKey() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/RegenerateKey.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/RegenerateKey.json // this example is just showing the usage of "Accounts_RegenerateKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorCollection.cs b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorCollection.cs index ac9f8d5e9ce01..0642345d40ce0 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorCollection.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MapsCreatorCollection [Ignore("Only validating compilation of examples")] public async Task GetAll_ListCreatorResourcesByAccount() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/ListMapsCreatorsByAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/ListMapsCreatorsByAccount.json // this example is just showing the usage of "Creators_ListByAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListCreatorResourcesByAccount() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateCreatorResource() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/CreateMapsCreator.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/CreateMapsCreator.json // this example is just showing the usage of "Creators_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task CreateOrUpdate_CreateCreatorResource() [Ignore("Only validating compilation of examples")] public async Task Get_GetCreatorResource() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetMapsCreator.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/GetMapsCreator.json // this example is just showing the usage of "Creators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task Get_GetCreatorResource() [Ignore("Only validating compilation of examples")] public async Task Exists_GetCreatorResource() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetMapsCreator.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/GetMapsCreator.json // this example is just showing the usage of "Creators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +162,7 @@ public async Task Exists_GetCreatorResource() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetCreatorResource() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetMapsCreator.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/GetMapsCreator.json // this example is just showing the usage of "Creators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorResource.cs b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorResource.cs index 8664a2d601e6b..30ae174a909c7 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorResource.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MapsCreatorResource [Ignore("Only validating compilation of examples")] public async Task Update_UpdateCreatorResource() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/UpdateMapsCreator.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateMapsCreator.json // this example is just showing the usage of "Creators_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task Update_UpdateCreatorResource() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteCreatorResource() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/DeleteMapsCreator.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/DeleteMapsCreator.json // this example is just showing the usage of "Creators_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Delete_DeleteCreatorResource() [Ignore("Only validating compilation of examples")] public async Task Get_GetCreatorResource() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetMapsCreator.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/GetMapsCreator.json // this example is just showing the usage of "Creators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/ArmMapsModelFactory.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/ArmMapsModelFactory.cs index b899dabbe7bd2..cdb1382fbc178 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/ArmMapsModelFactory.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/ArmMapsModelFactory.cs @@ -25,7 +25,7 @@ public static partial class ArmMapsModelFactory /// The location. /// The SKU of this account. /// Get or Set Kind property. - /// Sets the identity property for maps account. + /// Managed service identity (system assigned and/or user assigned identities). /// The map account properties. /// A new instance for mocking. public static MapsAccountData MapsAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, MapsSku sku = null, MapsAccountKind? kind = null, ManagedServiceIdentity identity = null, MapsAccountProperties properties = null) @@ -57,12 +57,13 @@ public static MapsSku MapsSku(MapsSkuName name = default, string tier = null) /// Initializes a new instance of . /// A unique identifier for the maps account. - /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys authentication from any usage. - /// The provisioning state of the Map account resource. - /// Sets the resources to be used for Managed Identities based operations for the Map account resource. + /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys and Shared Access Signature Token authentication from any usage. + /// The provisioning state of the Map account resource, Account updates can only be performed on terminal states. Terminal states: `Succeeded` and `Failed`. + /// The array of associated resources to the Map account. Linked resource in the array cannot individually update, you must update all linked resources in the array together. These resources may be used on operations on the Azure Maps REST API. Access is controlled by the Map Account Managed Identity(s) permissions to those resource(s). /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. + /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. /// A new instance for mocking. - public static MapsAccountProperties MapsAccountProperties(Guid? uniqueId = null, bool? disableLocalAuth = null, string provisioningState = null, IEnumerable linkedResources = null, IEnumerable corsRulesValue = null) + public static MapsAccountProperties MapsAccountProperties(Guid? uniqueId = null, bool? disableLocalAuth = null, string provisioningState = null, IEnumerable linkedResources = null, IEnumerable corsRulesValue = null, Encryption encryption = null) { linkedResources ??= new List(); corsRulesValue ??= new List(); @@ -73,6 +74,7 @@ public static MapsAccountProperties MapsAccountProperties(Guid? uniqueId = null, provisioningState, linkedResources?.ToList(), corsRulesValue != null ? new CorsRules(corsRulesValue?.ToList(), serializedAdditionalRawData: null) : null, + encryption, serializedAdditionalRawData: null); } @@ -80,14 +82,15 @@ public static MapsAccountProperties MapsAccountProperties(Guid? uniqueId = null, /// Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. /// Get or Set Kind property. /// The SKU of this account. - /// Sets the identity property for maps account. + /// Managed service identity (system assigned and/or user assigned identities). /// A unique identifier for the maps account. - /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys authentication from any usage. - /// The provisioning state of the Map account resource. - /// Sets the resources to be used for Managed Identities based operations for the Map account resource. + /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys and Shared Access Signature Token authentication from any usage. + /// The provisioning state of the Map account resource, Account updates can only be performed on terminal states. Terminal states: `Succeeded` and `Failed`. + /// The array of associated resources to the Map account. Linked resource in the array cannot individually update, you must update all linked resources in the array together. These resources may be used on operations on the Azure Maps REST API. Access is controlled by the Map Account Managed Identity(s) permissions to those resource(s). /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. + /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. /// A new instance for mocking. - public static MapsAccountPatch MapsAccountPatch(IDictionary tags = null, MapsAccountKind? kind = null, MapsSku sku = null, ManagedServiceIdentity identity = null, Guid? uniqueId = null, bool? disableLocalAuth = null, string provisioningState = null, IEnumerable linkedResources = null, IEnumerable corsRulesValue = null) + public static MapsAccountPatch MapsAccountPatch(IDictionary tags = null, MapsAccountKind? kind = null, MapsSku sku = null, ManagedServiceIdentity identity = null, Guid? uniqueId = null, bool? disableLocalAuth = null, string provisioningState = null, IEnumerable linkedResources = null, IEnumerable corsRulesValue = null, Encryption encryption = null) { tags ??= new Dictionary(); linkedResources ??= new List(); @@ -103,16 +106,17 @@ public static MapsAccountPatch MapsAccountPatch(IDictionary tags provisioningState, linkedResources?.ToList(), corsRulesValue != null ? new CorsRules(corsRulesValue?.ToList(), serializedAdditionalRawData: null) : null, + encryption, serializedAdditionalRawData: null); } /// Initializes a new instance of . - /// The Map account key to use for signing. + /// The Map account key to use for signing. Picking `primaryKey` or `secondaryKey` will use the Map account Shared Keys, and using `managedIdentity` will use the auto-renewed private key to sign the SAS. /// The principal Id also known as the object Id of a User Assigned Managed Identity currently assigned to the Map Account. To assign a Managed Identity of the account, use operation Create or Update an assign a User Assigned Identity resource Id. /// Optional, allows control of which region locations are permitted access to Azure Maps REST APIs with the SAS token. Example: "eastus", "westus2". Omitting this parameter will allow all region locations to be accessible. /// Required parameter which represents the desired maximum request per second to allowed for the given SAS token. This does not guarantee perfect accuracy in measurements but provides application safe guards of abuse with eventual enforcement. - /// The date time offset of when the token validity begins. For example "2017-05-24T10:42:03.1567373Z". - /// The date time offset of when the token validity expires. For example "2017-05-24T10:42:03.1567373Z". + /// The date time offset of when the token validity begins. For example "2017-05-24T10:42:03.1567373Z". Maximum duration allowed is 24 hours between `start` and `expiry`. + /// The date time offset of when the token validity expires. For example "2017-05-24T10:42:03.1567373Z". Maximum duration allowed is 24 hours between `start` and `expiry`. /// A new instance for mocking. public static MapsAccountSasContent MapsAccountSasContent(MapsSigningKey signingKey = default, string principalId = null, IEnumerable regions = null, int maxRatePerSecond = default, string start = null, string expiry = null) { diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Extensions/MapsExtensions.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Extensions/MapsExtensions.cs index 91ddcbeb41789..f197ae47f80f4 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Extensions/MapsExtensions.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Extensions/MapsExtensions.cs @@ -100,7 +100,7 @@ public static MapsAccountCollection GetMapsAccounts(this ResourceGroupResource r /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -138,7 +138,7 @@ public static async Task> GetMapsAccountAsync(this /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -176,7 +176,7 @@ public static Response GetMapsAccount(this ResourceGroupRes /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -212,7 +212,7 @@ public static AsyncPageable GetMapsAccountsAsync(this Subsc /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Extensions/MockableMapsResourceGroupResource.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Extensions/MockableMapsResourceGroupResource.cs index 3187f40e67531..f14ec76a89aee 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Extensions/MockableMapsResourceGroupResource.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Extensions/MockableMapsResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual MapsAccountCollection GetMapsAccounts() /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetMapsAccountAsync(str /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Extensions/MockableMapsSubscriptionResource.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Extensions/MockableMapsSubscriptionResource.cs index 31dc2da70e4b7..9c7e649c2839f 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Extensions/MockableMapsSubscriptionResource.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Extensions/MockableMapsSubscriptionResource.cs @@ -52,7 +52,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -82,7 +82,7 @@ public virtual AsyncPageable GetMapsAccountsAsync(Cancellat /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountCollection.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountCollection.cs index 48cc65c96faf0..c83866e66520b 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountCollection.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string account /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string accountName, Cancellatio /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string accountName, Cancel /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string accountName, CancellationToken cance /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountData.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountData.cs index b77633b044cba..b3fbfd4829f74 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountData.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountData.cs @@ -71,7 +71,7 @@ public MapsAccountData(AzureLocation location, MapsSku sku) : base(location) /// The location. /// The SKU of this account. /// Get or Set Kind property. - /// Sets the identity property for maps account. + /// Managed service identity (system assigned and/or user assigned identities). /// The map account properties. /// Keeps track of any properties unknown to the library. internal MapsAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MapsSku sku, MapsAccountKind? kind, ManagedServiceIdentity identity, MapsAccountProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) @@ -92,7 +92,7 @@ internal MapsAccountData() public MapsSku Sku { get; set; } /// Get or Set Kind property. public MapsAccountKind? Kind { get; set; } - /// Sets the identity property for maps account. + /// Managed service identity (system assigned and/or user assigned identities). public ManagedServiceIdentity Identity { get; set; } /// The map account properties. public MapsAccountProperties Properties { get; set; } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountResource.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountResource.cs index c8759a206da24..970c3abba30c6 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountResource.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountResource.cs @@ -110,7 +110,7 @@ public virtual MapsCreatorCollection GetMapsCreators() /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetMapsCreatorAsync(str /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetMapsCreator(string creatorName, /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -340,7 +340,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> UpdateAsync(MapsAccount /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual Response Update(MapsAccountPatch patch, Canc /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -474,7 +474,7 @@ public virtual async Task> GetSasAsync(MapsAccount /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -516,7 +516,7 @@ public virtual Response GetSas(MapsAccountSasContent conten /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -554,7 +554,7 @@ public virtual async Task> GetKeysAsync(CancellationTo /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -592,7 +592,7 @@ public virtual Response GetKeys(CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -634,7 +634,7 @@ public virtual async Task> RegenerateKeysAsync(MapsKey /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -676,7 +676,7 @@ public virtual Response RegenerateKeys(MapsKeySpecification key /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -738,7 +738,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -800,7 +800,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -857,7 +857,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -914,7 +914,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -974,7 +974,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsCreatorCollection.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsCreatorCollection.cs index c083a06bcc262..22ed9da47ff00 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsCreatorCollection.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsCreatorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string creator /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string creatorName, Cancellatio /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string creatorName, Cancel /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string creatorName, CancellationToken cance /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsCreatorResource.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsCreatorResource.cs index 855b96c1c6238..32ebf97691bbf 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsCreatorResource.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsCreatorResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(MapsCreator /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual Response Update(MapsCreatorPatch patch, Canc /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -417,7 +417,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -479,7 +479,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -536,7 +536,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -593,7 +593,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource @@ -653,7 +653,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2021-12-01-preview + /// 2023-06-01 /// /// /// Resource diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryption.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryption.Serialization.cs new file mode 100644 index 0000000000000..82fbf56c55d1d --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryption.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Maps.Models +{ + public partial class CustomerManagedKeyEncryption : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryption)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyEncryptionKeyIdentity)) + { + writer.WritePropertyName("keyEncryptionKeyIdentity"u8); + writer.WriteObjectValue(KeyEncryptionKeyIdentity, options); + } + if (Optional.IsDefined(KeyEncryptionKeyUri)) + { + writer.WritePropertyName("keyEncryptionKeyUrl"u8); + writer.WriteStringValue(KeyEncryptionKeyUri.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CustomerManagedKeyEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryption)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomerManagedKeyEncryption(document.RootElement, options); + } + + internal static CustomerManagedKeyEncryption DeserializeCustomerManagedKeyEncryption(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CustomerManagedKeyEncryptionKeyIdentity keyEncryptionKeyIdentity = default; + Uri keyEncryptionKeyUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyEncryptionKeyIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyEncryptionKeyIdentity = CustomerManagedKeyEncryptionKeyIdentity.DeserializeCustomerManagedKeyEncryptionKeyIdentity(property.Value, options); + continue; + } + if (property.NameEquals("keyEncryptionKeyUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyEncryptionKeyUrl = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomerManagedKeyEncryption(keyEncryptionKeyIdentity, keyEncryptionKeyUrl, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryption)} does not support writing '{options.Format}' format."); + } + } + + CustomerManagedKeyEncryption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomerManagedKeyEncryption(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryption)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryption.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryption.cs new file mode 100644 index 0000000000000..65cf18220f0c2 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryption.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Maps.Models +{ + /// All Customer-managed key encryption properties for the resource. + public partial class CustomerManagedKeyEncryption + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CustomerManagedKeyEncryption() + { + } + + /// Initializes a new instance of . + /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. + /// key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek. + /// Keeps track of any properties unknown to the library. + internal CustomerManagedKeyEncryption(CustomerManagedKeyEncryptionKeyIdentity keyEncryptionKeyIdentity, Uri keyEncryptionKeyUri, IDictionary serializedAdditionalRawData) + { + KeyEncryptionKeyIdentity = keyEncryptionKeyIdentity; + KeyEncryptionKeyUri = keyEncryptionKeyUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. + public CustomerManagedKeyEncryptionKeyIdentity KeyEncryptionKeyIdentity { get; set; } + /// key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek. + public Uri KeyEncryptionKeyUri { get; set; } + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.Serialization.cs new file mode 100644 index 0000000000000..c4a5b6e6885a4 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Maps.Models +{ + public partial class CustomerManagedKeyEncryptionKeyIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryptionKeyIdentity)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IdentityType)) + { + writer.WritePropertyName("identityType"u8); + writer.WriteStringValue(IdentityType.Value.ToString()); + } + if (Optional.IsDefined(UserAssignedIdentityResourceId)) + { + writer.WritePropertyName("userAssignedIdentityResourceId"u8); + writer.WriteStringValue(UserAssignedIdentityResourceId); + } + if (Optional.IsDefined(DelegatedIdentityClientId)) + { + writer.WritePropertyName("delegatedIdentityClientId"u8); + writer.WriteStringValue(DelegatedIdentityClientId.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CustomerManagedKeyEncryptionKeyIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryptionKeyIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomerManagedKeyEncryptionKeyIdentity(document.RootElement, options); + } + + internal static CustomerManagedKeyEncryptionKeyIdentity DeserializeCustomerManagedKeyEncryptionKeyIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IdentityType? identityType = default; + ResourceIdentifier userAssignedIdentityResourceId = default; + Guid? delegatedIdentityClientId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identityType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identityType = new IdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentityResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedIdentityResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("delegatedIdentityClientId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delegatedIdentityClientId = property.Value.GetGuid(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomerManagedKeyEncryptionKeyIdentity(identityType, userAssignedIdentityResourceId, delegatedIdentityClientId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryptionKeyIdentity)} does not support writing '{options.Format}' format."); + } + } + + CustomerManagedKeyEncryptionKeyIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomerManagedKeyEncryptionKeyIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomerManagedKeyEncryptionKeyIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.cs new file mode 100644 index 0000000000000..6c85bf014463f --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Maps.Models +{ + /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. + public partial class CustomerManagedKeyEncryptionKeyIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CustomerManagedKeyEncryptionKeyIdentity() + { + } + + /// Initializes a new instance of . + /// Values can be systemAssignedIdentity or userAssignedIdentity. + /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and delegatedResourceIdentity. + /// delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only. + /// Keeps track of any properties unknown to the library. + internal CustomerManagedKeyEncryptionKeyIdentity(IdentityType? identityType, ResourceIdentifier userAssignedIdentityResourceId, Guid? delegatedIdentityClientId, IDictionary serializedAdditionalRawData) + { + IdentityType = identityType; + UserAssignedIdentityResourceId = userAssignedIdentityResourceId; + DelegatedIdentityClientId = delegatedIdentityClientId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Values can be systemAssignedIdentity or userAssignedIdentity. + public IdentityType? IdentityType { get; set; } + /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and delegatedResourceIdentity. + public ResourceIdentifier UserAssignedIdentityResourceId { get; set; } + /// delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only. + public Guid? DelegatedIdentityClientId { get; set; } + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.Serialization.cs new file mode 100644 index 0000000000000..cbdfe9180b491 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Maps.Models +{ + public partial class Encryption : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Encryption)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(InfrastructureEncryption)) + { + writer.WritePropertyName("infrastructureEncryption"u8); + writer.WriteStringValue(InfrastructureEncryption.Value.ToString()); + } + if (Optional.IsDefined(CustomerManagedKeyEncryption)) + { + writer.WritePropertyName("customerManagedKeyEncryption"u8); + writer.WriteObjectValue(CustomerManagedKeyEncryption, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + Encryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Encryption)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEncryption(document.RootElement, options); + } + + internal static Encryption DeserializeEncryption(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InfrastructureEncryption? infrastructureEncryption = default; + CustomerManagedKeyEncryption customerManagedKeyEncryption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("infrastructureEncryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + infrastructureEncryption = new InfrastructureEncryption(property.Value.GetString()); + continue; + } + if (property.NameEquals("customerManagedKeyEncryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customerManagedKeyEncryption = CustomerManagedKeyEncryption.DeserializeCustomerManagedKeyEncryption(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Encryption(infrastructureEncryption, customerManagedKeyEncryption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(Encryption)} does not support writing '{options.Format}' format."); + } + } + + Encryption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEncryption(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Encryption)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.cs new file mode 100644 index 0000000000000..e8dbb65c7d37d --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Maps.Models +{ + /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. + public partial class Encryption + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public Encryption() + { + } + + /// Initializes a new instance of . + /// Values are enabled and disabled. + /// All Customer-managed key encryption properties for the resource. + /// Keeps track of any properties unknown to the library. + internal Encryption(InfrastructureEncryption? infrastructureEncryption, CustomerManagedKeyEncryption customerManagedKeyEncryption, IDictionary serializedAdditionalRawData) + { + InfrastructureEncryption = infrastructureEncryption; + CustomerManagedKeyEncryption = customerManagedKeyEncryption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Values are enabled and disabled. + public InfrastructureEncryption? InfrastructureEncryption { get; set; } + /// All Customer-managed key encryption properties for the resource. + public CustomerManagedKeyEncryption CustomerManagedKeyEncryption { get; set; } + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/IdentityType.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/IdentityType.cs new file mode 100644 index 0000000000000..b133bcb6c3523 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/IdentityType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Maps.Models +{ + /// Values can be systemAssignedIdentity or userAssignedIdentity. + public readonly partial struct IdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SystemAssignedIdentityValue = "systemAssignedIdentity"; + private const string UserAssignedIdentityValue = "userAssignedIdentity"; + private const string DelegatedResourceIdentityValue = "delegatedResourceIdentity"; + + /// systemAssignedIdentity. + public static IdentityType SystemAssignedIdentity { get; } = new IdentityType(SystemAssignedIdentityValue); + /// userAssignedIdentity. + public static IdentityType UserAssignedIdentity { get; } = new IdentityType(UserAssignedIdentityValue); + /// delegatedResourceIdentity. + public static IdentityType DelegatedResourceIdentity { get; } = new IdentityType(DelegatedResourceIdentityValue); + /// Determines if two values are the same. + public static bool operator ==(IdentityType left, IdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IdentityType left, IdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IdentityType(string value) => new IdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IdentityType other && Equals(other); + /// + public bool Equals(IdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/InfrastructureEncryption.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/InfrastructureEncryption.cs new file mode 100644 index 0000000000000..7b10291aae674 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/InfrastructureEncryption.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Maps.Models +{ + /// Values are enabled and disabled. + public readonly partial struct InfrastructureEncryption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InfrastructureEncryption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "enabled"; + private const string DisabledValue = "disabled"; + + /// enabled. + public static InfrastructureEncryption Enabled { get; } = new InfrastructureEncryption(EnabledValue); + /// disabled. + public static InfrastructureEncryption Disabled { get; } = new InfrastructureEncryption(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(InfrastructureEncryption left, InfrastructureEncryption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InfrastructureEncryption left, InfrastructureEncryption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator InfrastructureEncryption(string value) => new InfrastructureEncryption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InfrastructureEncryption other && Equals(other); + /// + public bool Equals(InfrastructureEncryption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.Serialization.cs index 5b4dbd00c168d..b0e664fd3ac73 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.Serialization.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.Serialization.cs @@ -93,6 +93,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("cors"u8); writer.WriteObjectValue(Cors, options); } + if (Optional.IsDefined(Encryption)) + { + writer.WritePropertyName("encryption"u8); + writer.WriteObjectValue(Encryption, options); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -140,6 +145,7 @@ internal static MapsAccountPatch DeserializeMapsAccountPatch(JsonElement element string provisioningState = default; IList linkedResources = default; CorsRules cors = default; + Encryption encryption = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -240,6 +246,15 @@ internal static MapsAccountPatch DeserializeMapsAccountPatch(JsonElement element cors = CorsRules.DeserializeCorsRules(property0.Value, options); continue; } + if (property0.NameEquals("encryption"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryption = Encryption.DeserializeEncryption(property0.Value, options); + continue; + } } continue; } @@ -259,6 +274,7 @@ internal static MapsAccountPatch DeserializeMapsAccountPatch(JsonElement element provisioningState, linkedResources ?? new ChangeTrackingList(), cors, + encryption, serializedAdditionalRawData); } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.cs index d52936ee75e6e..fc6c536d7a1ab 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.cs @@ -57,14 +57,15 @@ public MapsAccountPatch() /// Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. /// Get or Set Kind property. /// The SKU of this account. - /// Sets the identity property for maps account. + /// Managed service identity (system assigned and/or user assigned identities). /// A unique identifier for the maps account. - /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys authentication from any usage. - /// The provisioning state of the Map account resource. - /// Sets the resources to be used for Managed Identities based operations for the Map account resource. + /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys and Shared Access Signature Token authentication from any usage. + /// The provisioning state of the Map account resource, Account updates can only be performed on terminal states. Terminal states: `Succeeded` and `Failed`. + /// The array of associated resources to the Map account. Linked resource in the array cannot individually update, you must update all linked resources in the array together. These resources may be used on operations on the Azure Maps REST API. Access is controlled by the Map Account Managed Identity(s) permissions to those resource(s). /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. + /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. /// Keeps track of any properties unknown to the library. - internal MapsAccountPatch(IDictionary tags, MapsAccountKind? kind, MapsSku sku, ManagedServiceIdentity identity, Guid? uniqueId, bool? disableLocalAuth, string provisioningState, IList linkedResources, CorsRules cors, IDictionary serializedAdditionalRawData) + internal MapsAccountPatch(IDictionary tags, MapsAccountKind? kind, MapsSku sku, ManagedServiceIdentity identity, Guid? uniqueId, bool? disableLocalAuth, string provisioningState, IList linkedResources, CorsRules cors, Encryption encryption, IDictionary serializedAdditionalRawData) { Tags = tags; Kind = kind; @@ -75,6 +76,7 @@ internal MapsAccountPatch(IDictionary tags, MapsAccountKind? kin ProvisioningState = provisioningState; LinkedResources = linkedResources; Cors = cors; + Encryption = encryption; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -84,15 +86,15 @@ internal MapsAccountPatch(IDictionary tags, MapsAccountKind? kin public MapsAccountKind? Kind { get; set; } /// The SKU of this account. public MapsSku Sku { get; set; } - /// Sets the identity property for maps account. + /// Managed service identity (system assigned and/or user assigned identities). public ManagedServiceIdentity Identity { get; set; } /// A unique identifier for the maps account. public Guid? UniqueId { get; } - /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys authentication from any usage. + /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys and Shared Access Signature Token authentication from any usage. public bool? DisableLocalAuth { get; set; } - /// The provisioning state of the Map account resource. + /// The provisioning state of the Map account resource, Account updates can only be performed on terminal states. Terminal states: `Succeeded` and `Failed`. public string ProvisioningState { get; } - /// Sets the resources to be used for Managed Identities based operations for the Map account resource. + /// The array of associated resources to the Map account. Linked resource in the array cannot individually update, you must update all linked resources in the array together. These resources may be used on operations on the Azure Maps REST API. Access is controlled by the Map Account Managed Identity(s) permissions to those resource(s). public IList LinkedResources { get; } /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. internal CorsRules Cors { get; set; } @@ -106,5 +108,8 @@ public IList CorsRulesValue return Cors.CorsRulesValue; } } + + /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. + public Encryption Encryption { get; set; } } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.Serialization.cs index 1ae280d460340..52a9252850562 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.Serialization.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.Serialization.cs @@ -64,6 +64,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("cors"u8); writer.WriteObjectValue(Cors, options); } + if (Optional.IsDefined(Encryption)) + { + writer.WritePropertyName("encryption"u8); + writer.WriteObjectValue(Encryption, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -106,6 +111,7 @@ internal static MapsAccountProperties DeserializeMapsAccountProperties(JsonEleme string provisioningState = default; IList linkedResources = default; CorsRules cors = default; + Encryption encryption = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -156,6 +162,15 @@ internal static MapsAccountProperties DeserializeMapsAccountProperties(JsonEleme cors = CorsRules.DeserializeCorsRules(property.Value, options); continue; } + if (property.NameEquals("encryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryption = Encryption.DeserializeEncryption(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -168,6 +183,7 @@ internal static MapsAccountProperties DeserializeMapsAccountProperties(JsonEleme provisioningState, linkedResources ?? new ChangeTrackingList(), cors, + encryption, serializedAdditionalRawData); } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.cs index c160503d6c516..8a76d5695faef 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.cs @@ -53,28 +53,30 @@ public MapsAccountProperties() /// Initializes a new instance of . /// A unique identifier for the maps account. - /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys authentication from any usage. - /// The provisioning state of the Map account resource. - /// Sets the resources to be used for Managed Identities based operations for the Map account resource. + /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys and Shared Access Signature Token authentication from any usage. + /// The provisioning state of the Map account resource, Account updates can only be performed on terminal states. Terminal states: `Succeeded` and `Failed`. + /// The array of associated resources to the Map account. Linked resource in the array cannot individually update, you must update all linked resources in the array together. These resources may be used on operations on the Azure Maps REST API. Access is controlled by the Map Account Managed Identity(s) permissions to those resource(s). /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. + /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. /// Keeps track of any properties unknown to the library. - internal MapsAccountProperties(Guid? uniqueId, bool? disableLocalAuth, string provisioningState, IList linkedResources, CorsRules cors, IDictionary serializedAdditionalRawData) + internal MapsAccountProperties(Guid? uniqueId, bool? disableLocalAuth, string provisioningState, IList linkedResources, CorsRules cors, Encryption encryption, IDictionary serializedAdditionalRawData) { UniqueId = uniqueId; DisableLocalAuth = disableLocalAuth; ProvisioningState = provisioningState; LinkedResources = linkedResources; Cors = cors; + Encryption = encryption; _serializedAdditionalRawData = serializedAdditionalRawData; } /// A unique identifier for the maps account. public Guid? UniqueId { get; } - /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys authentication from any usage. + /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys and Shared Access Signature Token authentication from any usage. public bool? DisableLocalAuth { get; set; } - /// The provisioning state of the Map account resource. + /// The provisioning state of the Map account resource, Account updates can only be performed on terminal states. Terminal states: `Succeeded` and `Failed`. public string ProvisioningState { get; } - /// Sets the resources to be used for Managed Identities based operations for the Map account resource. + /// The array of associated resources to the Map account. Linked resource in the array cannot individually update, you must update all linked resources in the array together. These resources may be used on operations on the Azure Maps REST API. Access is controlled by the Map Account Managed Identity(s) permissions to those resource(s). public IList LinkedResources { get; } /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. internal CorsRules Cors { get; set; } @@ -88,5 +90,8 @@ public IList CorsRulesValue return Cors.CorsRulesValue; } } + + /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. + public Encryption Encryption { get; set; } } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasContent.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasContent.cs index bba4c53bfeb61..a405c73db2f8d 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasContent.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasContent.cs @@ -46,11 +46,11 @@ public partial class MapsAccountSasContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The Map account key to use for signing. + /// The Map account key to use for signing. Picking `primaryKey` or `secondaryKey` will use the Map account Shared Keys, and using `managedIdentity` will use the auto-renewed private key to sign the SAS. /// The principal Id also known as the object Id of a User Assigned Managed Identity currently assigned to the Map Account. To assign a Managed Identity of the account, use operation Create or Update an assign a User Assigned Identity resource Id. /// Required parameter which represents the desired maximum request per second to allowed for the given SAS token. This does not guarantee perfect accuracy in measurements but provides application safe guards of abuse with eventual enforcement. - /// The date time offset of when the token validity begins. For example "2017-05-24T10:42:03.1567373Z". - /// The date time offset of when the token validity expires. For example "2017-05-24T10:42:03.1567373Z". + /// The date time offset of when the token validity begins. For example "2017-05-24T10:42:03.1567373Z". Maximum duration allowed is 24 hours between `start` and `expiry`. + /// The date time offset of when the token validity expires. For example "2017-05-24T10:42:03.1567373Z". Maximum duration allowed is 24 hours between `start` and `expiry`. /// , or is null. public MapsAccountSasContent(MapsSigningKey signingKey, string principalId, int maxRatePerSecond, string start, string expiry) { @@ -67,12 +67,12 @@ public MapsAccountSasContent(MapsSigningKey signingKey, string principalId, int } /// Initializes a new instance of . - /// The Map account key to use for signing. + /// The Map account key to use for signing. Picking `primaryKey` or `secondaryKey` will use the Map account Shared Keys, and using `managedIdentity` will use the auto-renewed private key to sign the SAS. /// The principal Id also known as the object Id of a User Assigned Managed Identity currently assigned to the Map Account. To assign a Managed Identity of the account, use operation Create or Update an assign a User Assigned Identity resource Id. /// Optional, allows control of which region locations are permitted access to Azure Maps REST APIs with the SAS token. Example: "eastus", "westus2". Omitting this parameter will allow all region locations to be accessible. /// Required parameter which represents the desired maximum request per second to allowed for the given SAS token. This does not guarantee perfect accuracy in measurements but provides application safe guards of abuse with eventual enforcement. - /// The date time offset of when the token validity begins. For example "2017-05-24T10:42:03.1567373Z". - /// The date time offset of when the token validity expires. For example "2017-05-24T10:42:03.1567373Z". + /// The date time offset of when the token validity begins. For example "2017-05-24T10:42:03.1567373Z". Maximum duration allowed is 24 hours between `start` and `expiry`. + /// The date time offset of when the token validity expires. For example "2017-05-24T10:42:03.1567373Z". Maximum duration allowed is 24 hours between `start` and `expiry`. /// Keeps track of any properties unknown to the library. internal MapsAccountSasContent(MapsSigningKey signingKey, string principalId, IList regions, int maxRatePerSecond, string start, string expiry, IDictionary serializedAdditionalRawData) { @@ -90,7 +90,7 @@ internal MapsAccountSasContent() { } - /// The Map account key to use for signing. + /// The Map account key to use for signing. Picking `primaryKey` or `secondaryKey` will use the Map account Shared Keys, and using `managedIdentity` will use the auto-renewed private key to sign the SAS. public MapsSigningKey SigningKey { get; } /// The principal Id also known as the object Id of a User Assigned Managed Identity currently assigned to the Map Account. To assign a Managed Identity of the account, use operation Create or Update an assign a User Assigned Identity resource Id. public string PrincipalId { get; } @@ -98,9 +98,9 @@ internal MapsAccountSasContent() public IList Regions { get; } /// Required parameter which represents the desired maximum request per second to allowed for the given SAS token. This does not guarantee perfect accuracy in measurements but provides application safe guards of abuse with eventual enforcement. public int MaxRatePerSecond { get; } - /// The date time offset of when the token validity begins. For example "2017-05-24T10:42:03.1567373Z". + /// The date time offset of when the token validity begins. For example "2017-05-24T10:42:03.1567373Z". Maximum duration allowed is 24 hours between `start` and `expiry`. public string Start { get; } - /// The date time offset of when the token validity expires. For example "2017-05-24T10:42:03.1567373Z". + /// The date time offset of when the token validity expires. For example "2017-05-24T10:42:03.1567373Z". Maximum duration allowed is 24 hours between `start` and `expiry`. public string Expiry { get; } } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsSigningKey.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsSigningKey.cs index bb9f0de26486d..5bd809acb3a5a 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsSigningKey.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsSigningKey.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Maps.Models { - /// The Map account key to use for signing. + /// The Map account key to use for signing. Picking `primaryKey` or `secondaryKey` will use the Map account Shared Keys, and using `managedIdentity` will use the auto-renewed private key to sign the SAS. public readonly partial struct MapsSigningKey : IEquatable { private readonly string _value; @@ -24,11 +24,14 @@ public MapsSigningKey(string value) private const string PrimaryKeyValue = "primaryKey"; private const string SecondaryKeyValue = "secondaryKey"; + private const string ManagedIdentityValue = "managedIdentity"; /// primaryKey. public static MapsSigningKey PrimaryKey { get; } = new MapsSigningKey(PrimaryKeyValue); /// secondaryKey. public static MapsSigningKey SecondaryKey { get; } = new MapsSigningKey(SecondaryKeyValue); + /// managedIdentity. + public static MapsSigningKey ManagedIdentity { get; } = new MapsSigningKey(ManagedIdentityValue); /// Determines if two values are the same. public static bool operator ==(MapsSigningKey left, MapsSigningKey right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/AccountsRestOperations.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/AccountsRestOperations.cs index 36fb237ee061a..ddbb11cf3150a 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/AccountsRestOperations.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/AccountsRestOperations.cs @@ -32,7 +32,7 @@ public AccountsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-12-01-preview"; + _apiVersion = apiVersion ?? "2023-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/CreatorsRestOperations.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/CreatorsRestOperations.cs index 68e9ae933efbe..962fa81e9442c 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/CreatorsRestOperations.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/CreatorsRestOperations.cs @@ -32,7 +32,7 @@ public CreatorsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-12-01-preview"; + _apiVersion = apiVersion ?? "2023-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/autorest.md b/sdk/maps/Azure.ResourceManager.Maps/src/autorest.md index 68502408738bd..a9c5f492198f2 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/autorest.md +++ b/sdk/maps/Azure.ResourceManager.Maps/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: Maps namespace: Azure.ResourceManager.Maps -require: https://github.com/Azure/azure-rest-api-specs/blob/6b08774c89877269e73e11ac3ecbd1bd4e14f5a0/specification/maps/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/d8220a01ae67dedf6f0bbb5deebe941dc7b728d3/specification/maps/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: From d6497d4719ed8ff6cc6da5b0008192b86eabe2a9 Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Tue, 19 Nov 2024 17:53:32 +0800 Subject: [PATCH 2/5] Fix naming are too generic and re-gen API files --- .../api/Azure.ResourceManager.Maps.net8.0.cs | 81 ++++++++++++++++++- ...ure.ResourceManager.Maps.netstandard2.0.cs | 81 ++++++++++++++++++- .../Samples/Sample_MapsAccountCollection.cs | 4 +- .../Samples/Sample_MapsAccountResource.cs | 4 +- .../src/Generated/ArmMapsModelFactory.cs | 4 +- ...dKeyEncryptionKeyIdentity.Serialization.cs | 4 +- ...CustomerManagedKeyEncryptionKeyIdentity.cs | 4 +- .../Models/InfrastructureEncryption.cs | 51 ------------ .../Models/MapsAccountPatch.Serialization.cs | 4 +- .../src/Generated/Models/MapsAccountPatch.cs | 4 +- .../MapsAccountProperties.Serialization.cs | 4 +- .../Generated/Models/MapsAccountProperties.cs | 4 +- ...ion.cs => MapsEncryption.Serialization.cs} | 42 +++++----- .../{Encryption.cs => MapsEncryption.cs} | 12 +-- .../{IdentityType.cs => MapsIdentityType.cs} | 28 +++---- .../Models/MapsInfrastructureEncryption.cs | 51 ++++++++++++ .../src/autorest.md | 3 + 17 files changed, 271 insertions(+), 114 deletions(-) delete mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/InfrastructureEncryption.cs rename sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/{Encryption.Serialization.cs => MapsEncryption.Serialization.cs} (68%) rename sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/{Encryption.cs => MapsEncryption.cs} (83%) rename sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/{IdentityType.cs => MapsIdentityType.cs} (51%) create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsInfrastructureEncryption.cs diff --git a/sdk/maps/Azure.ResourceManager.Maps/api/Azure.ResourceManager.Maps.net8.0.cs b/sdk/maps/Azure.ResourceManager.Maps/api/Azure.ResourceManager.Maps.net8.0.cs index d5b12cd311606..41c03b99150cd 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/api/Azure.ResourceManager.Maps.net8.0.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/api/Azure.ResourceManager.Maps.net8.0.cs @@ -157,8 +157,8 @@ public static partial class ArmMapsModelFactory { public static Azure.ResourceManager.Maps.MapsAccountData MapsAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Maps.Models.MapsSku sku = null, Azure.ResourceManager.Maps.Models.MapsAccountKind? kind = default(Azure.ResourceManager.Maps.Models.MapsAccountKind?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Maps.Models.MapsAccountProperties properties = null) { throw null; } public static Azure.ResourceManager.Maps.Models.MapsAccountKeys MapsAccountKeys(System.DateTimeOffset? primaryKeyLastUpdatedOn = default(System.DateTimeOffset?), string primaryKey = null, string secondaryKey = null, System.DateTimeOffset? secondaryKeyLastUpdatedOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.Maps.Models.MapsAccountPatch MapsAccountPatch(System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Maps.Models.MapsAccountKind? kind = default(Azure.ResourceManager.Maps.Models.MapsAccountKind?), Azure.ResourceManager.Maps.Models.MapsSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Guid? uniqueId = default(System.Guid?), bool? disableLocalAuth = default(bool?), string provisioningState = null, System.Collections.Generic.IEnumerable linkedResources = null, System.Collections.Generic.IEnumerable corsRulesValue = null) { throw null; } - public static Azure.ResourceManager.Maps.Models.MapsAccountProperties MapsAccountProperties(System.Guid? uniqueId = default(System.Guid?), bool? disableLocalAuth = default(bool?), string provisioningState = null, System.Collections.Generic.IEnumerable linkedResources = null, System.Collections.Generic.IEnumerable corsRulesValue = null) { throw null; } + public static Azure.ResourceManager.Maps.Models.MapsAccountPatch MapsAccountPatch(System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Maps.Models.MapsAccountKind? kind = default(Azure.ResourceManager.Maps.Models.MapsAccountKind?), Azure.ResourceManager.Maps.Models.MapsSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Guid? uniqueId = default(System.Guid?), bool? disableLocalAuth = default(bool?), string provisioningState = null, System.Collections.Generic.IEnumerable linkedResources = null, System.Collections.Generic.IEnumerable corsRulesValue = null, Azure.ResourceManager.Maps.Models.MapsEncryption encryption = null) { throw null; } + public static Azure.ResourceManager.Maps.Models.MapsAccountProperties MapsAccountProperties(System.Guid? uniqueId = default(System.Guid?), bool? disableLocalAuth = default(bool?), string provisioningState = null, System.Collections.Generic.IEnumerable linkedResources = null, System.Collections.Generic.IEnumerable corsRulesValue = null, Azure.ResourceManager.Maps.Models.MapsEncryption encryption = null) { throw null; } public static Azure.ResourceManager.Maps.Models.MapsAccountSasContent MapsAccountSasContent(Azure.ResourceManager.Maps.Models.MapsSigningKey signingKey = default(Azure.ResourceManager.Maps.Models.MapsSigningKey), string principalId = null, System.Collections.Generic.IEnumerable regions = null, int maxRatePerSecond = 0, string start = null, string expiry = null) { throw null; } public static Azure.ResourceManager.Maps.Models.MapsAccountSasToken MapsAccountSasToken(string accountSasToken = null) { throw null; } public static Azure.ResourceManager.Maps.MapsCreatorData MapsCreatorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Maps.Models.MapsCreatorProperties properties = null) { throw null; } @@ -166,6 +166,31 @@ public static partial class ArmMapsModelFactory public static Azure.ResourceManager.Maps.Models.MapsCreatorProperties MapsCreatorProperties(string provisioningState = null, int storageUnits = 0) { throw null; } public static Azure.ResourceManager.Maps.Models.MapsSku MapsSku(Azure.ResourceManager.Maps.Models.MapsSkuName name = default(Azure.ResourceManager.Maps.Models.MapsSkuName), string tier = null) { throw null; } } + public partial class CustomerManagedKeyEncryption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomerManagedKeyEncryption() { } + public Azure.ResourceManager.Maps.Models.CustomerManagedKeyEncryptionKeyIdentity KeyEncryptionKeyIdentity { get { throw null; } set { } } + public System.Uri KeyEncryptionKeyUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Maps.Models.CustomerManagedKeyEncryption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Maps.Models.CustomerManagedKeyEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomerManagedKeyEncryptionKeyIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomerManagedKeyEncryptionKeyIdentity() { } + public System.Guid? DelegatedIdentityClientId { get { throw null; } set { } } + public Azure.ResourceManager.Maps.Models.MapsIdentityType? IdentityType { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier UserAssignedIdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Maps.Models.CustomerManagedKeyEncryptionKeyIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Maps.Models.CustomerManagedKeyEncryptionKeyIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class MapsAccountKeys : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MapsAccountKeys() { } @@ -203,6 +228,7 @@ public partial class MapsAccountPatch : System.ClientModel.Primitives.IJsonModel public MapsAccountPatch() { } public System.Collections.Generic.IList CorsRulesValue { get { throw null; } } public bool? DisableLocalAuth { get { throw null; } set { } } + public Azure.ResourceManager.Maps.Models.MapsEncryption Encryption { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.Maps.Models.MapsAccountKind? Kind { get { throw null; } set { } } public System.Collections.Generic.IList LinkedResources { get { throw null; } } @@ -222,6 +248,7 @@ public partial class MapsAccountProperties : System.ClientModel.Primitives.IJson public MapsAccountProperties() { } public System.Collections.Generic.IList CorsRulesValue { get { throw null; } } public bool? DisableLocalAuth { get { throw null; } set { } } + public Azure.ResourceManager.Maps.Models.MapsEncryption Encryption { get { throw null; } set { } } public System.Collections.Generic.IList LinkedResources { get { throw null; } } public string ProvisioningState { get { throw null; } } public System.Guid? UniqueId { get { throw null; } } @@ -295,6 +322,55 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class MapsEncryption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MapsEncryption() { } + public Azure.ResourceManager.Maps.Models.CustomerManagedKeyEncryption CustomerManagedKeyEncryption { get { throw null; } set { } } + public Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption? InfrastructureEncryption { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Maps.Models.MapsEncryption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Maps.Models.MapsEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MapsIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MapsIdentityType(string value) { throw null; } + public static Azure.ResourceManager.Maps.Models.MapsIdentityType DelegatedResourceIdentity { get { throw null; } } + public static Azure.ResourceManager.Maps.Models.MapsIdentityType SystemAssignedIdentity { get { throw null; } } + public static Azure.ResourceManager.Maps.Models.MapsIdentityType UserAssignedIdentity { get { throw null; } } + public bool Equals(Azure.ResourceManager.Maps.Models.MapsIdentityType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Maps.Models.MapsIdentityType left, Azure.ResourceManager.Maps.Models.MapsIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.Maps.Models.MapsIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Maps.Models.MapsIdentityType left, Azure.ResourceManager.Maps.Models.MapsIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MapsInfrastructureEncryption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MapsInfrastructureEncryption(string value) { throw null; } + public static Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption Disabled { get { throw null; } } + public static Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption left, Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption right) { throw null; } + public static implicit operator Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption left, Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption right) { throw null; } + public override string ToString() { throw null; } + } public partial class MapsKeySpecification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MapsKeySpecification(Azure.ResourceManager.Maps.Models.MapsKeyType keyType) { } @@ -342,6 +418,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public MapsSigningKey(string value) { throw null; } + public static Azure.ResourceManager.Maps.Models.MapsSigningKey ManagedIdentity { get { throw null; } } public static Azure.ResourceManager.Maps.Models.MapsSigningKey PrimaryKey { get { throw null; } } public static Azure.ResourceManager.Maps.Models.MapsSigningKey SecondaryKey { get { throw null; } } public bool Equals(Azure.ResourceManager.Maps.Models.MapsSigningKey other) { throw null; } diff --git a/sdk/maps/Azure.ResourceManager.Maps/api/Azure.ResourceManager.Maps.netstandard2.0.cs b/sdk/maps/Azure.ResourceManager.Maps/api/Azure.ResourceManager.Maps.netstandard2.0.cs index d5b12cd311606..41c03b99150cd 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/api/Azure.ResourceManager.Maps.netstandard2.0.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/api/Azure.ResourceManager.Maps.netstandard2.0.cs @@ -157,8 +157,8 @@ public static partial class ArmMapsModelFactory { public static Azure.ResourceManager.Maps.MapsAccountData MapsAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Maps.Models.MapsSku sku = null, Azure.ResourceManager.Maps.Models.MapsAccountKind? kind = default(Azure.ResourceManager.Maps.Models.MapsAccountKind?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Maps.Models.MapsAccountProperties properties = null) { throw null; } public static Azure.ResourceManager.Maps.Models.MapsAccountKeys MapsAccountKeys(System.DateTimeOffset? primaryKeyLastUpdatedOn = default(System.DateTimeOffset?), string primaryKey = null, string secondaryKey = null, System.DateTimeOffset? secondaryKeyLastUpdatedOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.Maps.Models.MapsAccountPatch MapsAccountPatch(System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Maps.Models.MapsAccountKind? kind = default(Azure.ResourceManager.Maps.Models.MapsAccountKind?), Azure.ResourceManager.Maps.Models.MapsSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Guid? uniqueId = default(System.Guid?), bool? disableLocalAuth = default(bool?), string provisioningState = null, System.Collections.Generic.IEnumerable linkedResources = null, System.Collections.Generic.IEnumerable corsRulesValue = null) { throw null; } - public static Azure.ResourceManager.Maps.Models.MapsAccountProperties MapsAccountProperties(System.Guid? uniqueId = default(System.Guid?), bool? disableLocalAuth = default(bool?), string provisioningState = null, System.Collections.Generic.IEnumerable linkedResources = null, System.Collections.Generic.IEnumerable corsRulesValue = null) { throw null; } + public static Azure.ResourceManager.Maps.Models.MapsAccountPatch MapsAccountPatch(System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Maps.Models.MapsAccountKind? kind = default(Azure.ResourceManager.Maps.Models.MapsAccountKind?), Azure.ResourceManager.Maps.Models.MapsSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Guid? uniqueId = default(System.Guid?), bool? disableLocalAuth = default(bool?), string provisioningState = null, System.Collections.Generic.IEnumerable linkedResources = null, System.Collections.Generic.IEnumerable corsRulesValue = null, Azure.ResourceManager.Maps.Models.MapsEncryption encryption = null) { throw null; } + public static Azure.ResourceManager.Maps.Models.MapsAccountProperties MapsAccountProperties(System.Guid? uniqueId = default(System.Guid?), bool? disableLocalAuth = default(bool?), string provisioningState = null, System.Collections.Generic.IEnumerable linkedResources = null, System.Collections.Generic.IEnumerable corsRulesValue = null, Azure.ResourceManager.Maps.Models.MapsEncryption encryption = null) { throw null; } public static Azure.ResourceManager.Maps.Models.MapsAccountSasContent MapsAccountSasContent(Azure.ResourceManager.Maps.Models.MapsSigningKey signingKey = default(Azure.ResourceManager.Maps.Models.MapsSigningKey), string principalId = null, System.Collections.Generic.IEnumerable regions = null, int maxRatePerSecond = 0, string start = null, string expiry = null) { throw null; } public static Azure.ResourceManager.Maps.Models.MapsAccountSasToken MapsAccountSasToken(string accountSasToken = null) { throw null; } public static Azure.ResourceManager.Maps.MapsCreatorData MapsCreatorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Maps.Models.MapsCreatorProperties properties = null) { throw null; } @@ -166,6 +166,31 @@ public static partial class ArmMapsModelFactory public static Azure.ResourceManager.Maps.Models.MapsCreatorProperties MapsCreatorProperties(string provisioningState = null, int storageUnits = 0) { throw null; } public static Azure.ResourceManager.Maps.Models.MapsSku MapsSku(Azure.ResourceManager.Maps.Models.MapsSkuName name = default(Azure.ResourceManager.Maps.Models.MapsSkuName), string tier = null) { throw null; } } + public partial class CustomerManagedKeyEncryption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomerManagedKeyEncryption() { } + public Azure.ResourceManager.Maps.Models.CustomerManagedKeyEncryptionKeyIdentity KeyEncryptionKeyIdentity { get { throw null; } set { } } + public System.Uri KeyEncryptionKeyUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Maps.Models.CustomerManagedKeyEncryption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Maps.Models.CustomerManagedKeyEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomerManagedKeyEncryptionKeyIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomerManagedKeyEncryptionKeyIdentity() { } + public System.Guid? DelegatedIdentityClientId { get { throw null; } set { } } + public Azure.ResourceManager.Maps.Models.MapsIdentityType? IdentityType { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier UserAssignedIdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Maps.Models.CustomerManagedKeyEncryptionKeyIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Maps.Models.CustomerManagedKeyEncryptionKeyIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class MapsAccountKeys : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MapsAccountKeys() { } @@ -203,6 +228,7 @@ public partial class MapsAccountPatch : System.ClientModel.Primitives.IJsonModel public MapsAccountPatch() { } public System.Collections.Generic.IList CorsRulesValue { get { throw null; } } public bool? DisableLocalAuth { get { throw null; } set { } } + public Azure.ResourceManager.Maps.Models.MapsEncryption Encryption { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.Maps.Models.MapsAccountKind? Kind { get { throw null; } set { } } public System.Collections.Generic.IList LinkedResources { get { throw null; } } @@ -222,6 +248,7 @@ public partial class MapsAccountProperties : System.ClientModel.Primitives.IJson public MapsAccountProperties() { } public System.Collections.Generic.IList CorsRulesValue { get { throw null; } } public bool? DisableLocalAuth { get { throw null; } set { } } + public Azure.ResourceManager.Maps.Models.MapsEncryption Encryption { get { throw null; } set { } } public System.Collections.Generic.IList LinkedResources { get { throw null; } } public string ProvisioningState { get { throw null; } } public System.Guid? UniqueId { get { throw null; } } @@ -295,6 +322,55 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class MapsEncryption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MapsEncryption() { } + public Azure.ResourceManager.Maps.Models.CustomerManagedKeyEncryption CustomerManagedKeyEncryption { get { throw null; } set { } } + public Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption? InfrastructureEncryption { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Maps.Models.MapsEncryption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Maps.Models.MapsEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MapsIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MapsIdentityType(string value) { throw null; } + public static Azure.ResourceManager.Maps.Models.MapsIdentityType DelegatedResourceIdentity { get { throw null; } } + public static Azure.ResourceManager.Maps.Models.MapsIdentityType SystemAssignedIdentity { get { throw null; } } + public static Azure.ResourceManager.Maps.Models.MapsIdentityType UserAssignedIdentity { get { throw null; } } + public bool Equals(Azure.ResourceManager.Maps.Models.MapsIdentityType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Maps.Models.MapsIdentityType left, Azure.ResourceManager.Maps.Models.MapsIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.Maps.Models.MapsIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Maps.Models.MapsIdentityType left, Azure.ResourceManager.Maps.Models.MapsIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MapsInfrastructureEncryption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MapsInfrastructureEncryption(string value) { throw null; } + public static Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption Disabled { get { throw null; } } + public static Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption left, Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption right) { throw null; } + public static implicit operator Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption left, Azure.ResourceManager.Maps.Models.MapsInfrastructureEncryption right) { throw null; } + public override string ToString() { throw null; } + } public partial class MapsKeySpecification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MapsKeySpecification(Azure.ResourceManager.Maps.Models.MapsKeyType keyType) { } @@ -342,6 +418,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public MapsSigningKey(string value) { throw null; } + public static Azure.ResourceManager.Maps.Models.MapsSigningKey ManagedIdentity { get { throw null; } } public static Azure.ResourceManager.Maps.Models.MapsSigningKey PrimaryKey { get { throw null; } } public static Azure.ResourceManager.Maps.Models.MapsSigningKey SecondaryKey { get { throw null; } } public bool Equals(Azure.ResourceManager.Maps.Models.MapsSigningKey other) { throw null; } diff --git a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountCollection.cs b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountCollection.cs index 2e1d5717acb90..5698921aefcc0 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountCollection.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountCollection.cs @@ -54,13 +54,13 @@ public async Task CreateOrUpdate_CreateAccountWithEncryption() }, Properties = new MapsAccountProperties() { - Encryption = new Encryption() + Encryption = new MapsEncryption() { CustomerManagedKeyEncryption = new CustomerManagedKeyEncryption() { KeyEncryptionKeyIdentity = new CustomerManagedKeyEncryptionKeyIdentity() { - IdentityType = IdentityType.UserAssignedIdentity, + IdentityType = MapsIdentityType.UserAssignedIdentity, UserAssignedIdentityResourceId = new ResourceIdentifier("/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName"), }, KeyEncryptionKeyUri = new Uri("https://contosovault.vault.azure.net/keys/contosokek"), diff --git a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountResource.cs b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountResource.cs index 97f21b6a43137..31658940cca93 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountResource.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountResource.cs @@ -48,13 +48,13 @@ public async Task Update_UpdateAccountEncryption() [new ResourceIdentifier("/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName")] = null, }, }, - Encryption = new Encryption() + Encryption = new MapsEncryption() { CustomerManagedKeyEncryption = new CustomerManagedKeyEncryption() { KeyEncryptionKeyIdentity = new CustomerManagedKeyEncryptionKeyIdentity() { - IdentityType = IdentityType.SystemAssignedIdentity, + IdentityType = MapsIdentityType.SystemAssignedIdentity, UserAssignedIdentityResourceId = null, }, KeyEncryptionKeyUri = new Uri("https://contosovault.vault.azure.net/keys/contosokek"), diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/ArmMapsModelFactory.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/ArmMapsModelFactory.cs index cdb1382fbc178..093bf0c051b46 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/ArmMapsModelFactory.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/ArmMapsModelFactory.cs @@ -63,7 +63,7 @@ public static MapsSku MapsSku(MapsSkuName name = default, string tier = null) /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. /// A new instance for mocking. - public static MapsAccountProperties MapsAccountProperties(Guid? uniqueId = null, bool? disableLocalAuth = null, string provisioningState = null, IEnumerable linkedResources = null, IEnumerable corsRulesValue = null, Encryption encryption = null) + public static MapsAccountProperties MapsAccountProperties(Guid? uniqueId = null, bool? disableLocalAuth = null, string provisioningState = null, IEnumerable linkedResources = null, IEnumerable corsRulesValue = null, MapsEncryption encryption = null) { linkedResources ??= new List(); corsRulesValue ??= new List(); @@ -90,7 +90,7 @@ public static MapsAccountProperties MapsAccountProperties(Guid? uniqueId = null, /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. /// A new instance for mocking. - public static MapsAccountPatch MapsAccountPatch(IDictionary tags = null, MapsAccountKind? kind = null, MapsSku sku = null, ManagedServiceIdentity identity = null, Guid? uniqueId = null, bool? disableLocalAuth = null, string provisioningState = null, IEnumerable linkedResources = null, IEnumerable corsRulesValue = null, Encryption encryption = null) + public static MapsAccountPatch MapsAccountPatch(IDictionary tags = null, MapsAccountKind? kind = null, MapsSku sku = null, ManagedServiceIdentity identity = null, Guid? uniqueId = null, bool? disableLocalAuth = null, string provisioningState = null, IEnumerable linkedResources = null, IEnumerable corsRulesValue = null, MapsEncryption encryption = null) { tags ??= new Dictionary(); linkedResources ??= new List(); diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.Serialization.cs index c4a5b6e6885a4..c67ffe3e283cb 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.Serialization.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.Serialization.cs @@ -86,7 +86,7 @@ internal static CustomerManagedKeyEncryptionKeyIdentity DeserializeCustomerManag { return null; } - IdentityType? identityType = default; + MapsIdentityType? identityType = default; ResourceIdentifier userAssignedIdentityResourceId = default; Guid? delegatedIdentityClientId = default; IDictionary serializedAdditionalRawData = default; @@ -99,7 +99,7 @@ internal static CustomerManagedKeyEncryptionKeyIdentity DeserializeCustomerManag { continue; } - identityType = new IdentityType(property.Value.GetString()); + identityType = new MapsIdentityType(property.Value.GetString()); continue; } if (property.NameEquals("userAssignedIdentityResourceId"u8)) diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.cs index 6c85bf014463f..cd231e08a64a5 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CustomerManagedKeyEncryptionKeyIdentity.cs @@ -56,7 +56,7 @@ public CustomerManagedKeyEncryptionKeyIdentity() /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and delegatedResourceIdentity. /// delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only. /// Keeps track of any properties unknown to the library. - internal CustomerManagedKeyEncryptionKeyIdentity(IdentityType? identityType, ResourceIdentifier userAssignedIdentityResourceId, Guid? delegatedIdentityClientId, IDictionary serializedAdditionalRawData) + internal CustomerManagedKeyEncryptionKeyIdentity(MapsIdentityType? identityType, ResourceIdentifier userAssignedIdentityResourceId, Guid? delegatedIdentityClientId, IDictionary serializedAdditionalRawData) { IdentityType = identityType; UserAssignedIdentityResourceId = userAssignedIdentityResourceId; @@ -65,7 +65,7 @@ internal CustomerManagedKeyEncryptionKeyIdentity(IdentityType? identityType, Res } /// Values can be systemAssignedIdentity or userAssignedIdentity. - public IdentityType? IdentityType { get; set; } + public MapsIdentityType? IdentityType { get; set; } /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and delegatedResourceIdentity. public ResourceIdentifier UserAssignedIdentityResourceId { get; set; } /// delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only. diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/InfrastructureEncryption.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/InfrastructureEncryption.cs deleted file mode 100644 index 7b10291aae674..0000000000000 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/InfrastructureEncryption.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Maps.Models -{ - /// Values are enabled and disabled. - public readonly partial struct InfrastructureEncryption : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public InfrastructureEncryption(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "enabled"; - private const string DisabledValue = "disabled"; - - /// enabled. - public static InfrastructureEncryption Enabled { get; } = new InfrastructureEncryption(EnabledValue); - /// disabled. - public static InfrastructureEncryption Disabled { get; } = new InfrastructureEncryption(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(InfrastructureEncryption left, InfrastructureEncryption right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(InfrastructureEncryption left, InfrastructureEncryption right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator InfrastructureEncryption(string value) => new InfrastructureEncryption(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InfrastructureEncryption other && Equals(other); - /// - public bool Equals(InfrastructureEncryption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.Serialization.cs index b0e664fd3ac73..c77685110ac72 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.Serialization.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.Serialization.cs @@ -145,7 +145,7 @@ internal static MapsAccountPatch DeserializeMapsAccountPatch(JsonElement element string provisioningState = default; IList linkedResources = default; CorsRules cors = default; - Encryption encryption = default; + MapsEncryption encryption = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -252,7 +252,7 @@ internal static MapsAccountPatch DeserializeMapsAccountPatch(JsonElement element { continue; } - encryption = Encryption.DeserializeEncryption(property0.Value, options); + encryption = MapsEncryption.DeserializeMapsEncryption(property0.Value, options); continue; } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.cs index fc6c536d7a1ab..f1f1a3c6c5e79 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.cs @@ -65,7 +65,7 @@ public MapsAccountPatch() /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. /// Keeps track of any properties unknown to the library. - internal MapsAccountPatch(IDictionary tags, MapsAccountKind? kind, MapsSku sku, ManagedServiceIdentity identity, Guid? uniqueId, bool? disableLocalAuth, string provisioningState, IList linkedResources, CorsRules cors, Encryption encryption, IDictionary serializedAdditionalRawData) + internal MapsAccountPatch(IDictionary tags, MapsAccountKind? kind, MapsSku sku, ManagedServiceIdentity identity, Guid? uniqueId, bool? disableLocalAuth, string provisioningState, IList linkedResources, CorsRules cors, MapsEncryption encryption, IDictionary serializedAdditionalRawData) { Tags = tags; Kind = kind; @@ -110,6 +110,6 @@ public IList CorsRulesValue } /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. - public Encryption Encryption { get; set; } + public MapsEncryption Encryption { get; set; } } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.Serialization.cs index 52a9252850562..0d050e652606d 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.Serialization.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.Serialization.cs @@ -111,7 +111,7 @@ internal static MapsAccountProperties DeserializeMapsAccountProperties(JsonEleme string provisioningState = default; IList linkedResources = default; CorsRules cors = default; - Encryption encryption = default; + MapsEncryption encryption = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -168,7 +168,7 @@ internal static MapsAccountProperties DeserializeMapsAccountProperties(JsonEleme { continue; } - encryption = Encryption.DeserializeEncryption(property.Value, options); + encryption = MapsEncryption.DeserializeMapsEncryption(property.Value, options); continue; } if (options.Format != "W") diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.cs index 8a76d5695faef..268bf00a57588 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.cs @@ -59,7 +59,7 @@ public MapsAccountProperties() /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. /// Keeps track of any properties unknown to the library. - internal MapsAccountProperties(Guid? uniqueId, bool? disableLocalAuth, string provisioningState, IList linkedResources, CorsRules cors, Encryption encryption, IDictionary serializedAdditionalRawData) + internal MapsAccountProperties(Guid? uniqueId, bool? disableLocalAuth, string provisioningState, IList linkedResources, CorsRules cors, MapsEncryption encryption, IDictionary serializedAdditionalRawData) { UniqueId = uniqueId; DisableLocalAuth = disableLocalAuth; @@ -92,6 +92,6 @@ public IList CorsRulesValue } /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. - public Encryption Encryption { get; set; } + public MapsEncryption Encryption { get; set; } } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsEncryption.Serialization.cs similarity index 68% rename from sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.Serialization.cs rename to sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsEncryption.Serialization.cs index cbdfe9180b491..389c2968501d7 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.Serialization.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsEncryption.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.Maps.Models { - public partial class Encryption : IUtf8JsonSerializable, IJsonModel + public partial class MapsEncryption : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(Encryption)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(MapsEncryption)} does not support writing '{format}' format."); } if (Optional.IsDefined(InfrastructureEncryption)) @@ -61,19 +61,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - Encryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + MapsEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(Encryption)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(MapsEncryption)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEncryption(document.RootElement, options); + return DeserializeMapsEncryption(document.RootElement, options); } - internal static Encryption DeserializeEncryption(JsonElement element, ModelReaderWriterOptions options = null) + internal static MapsEncryption DeserializeMapsEncryption(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -81,7 +81,7 @@ internal static Encryption DeserializeEncryption(JsonElement element, ModelReade { return null; } - InfrastructureEncryption? infrastructureEncryption = default; + MapsInfrastructureEncryption? infrastructureEncryption = default; CustomerManagedKeyEncryption customerManagedKeyEncryption = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -93,7 +93,7 @@ internal static Encryption DeserializeEncryption(JsonElement element, ModelReade { continue; } - infrastructureEncryption = new InfrastructureEncryption(property.Value.GetString()); + infrastructureEncryption = new MapsInfrastructureEncryption(property.Value.GetString()); continue; } if (property.NameEquals("customerManagedKeyEncryption"u8)) @@ -111,38 +111,38 @@ internal static Encryption DeserializeEncryption(JsonElement element, ModelReade } } serializedAdditionalRawData = rawDataDictionary; - return new Encryption(infrastructureEncryption, customerManagedKeyEncryption, serializedAdditionalRawData); + return new MapsEncryption(infrastructureEncryption, customerManagedKeyEncryption, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(Encryption)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(MapsEncryption)} does not support writing '{options.Format}' format."); } } - Encryption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + MapsEncryption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeEncryption(document.RootElement, options); + return DeserializeMapsEncryption(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(Encryption)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(MapsEncryption)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsEncryption.cs similarity index 83% rename from sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.cs rename to sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsEncryption.cs index e8dbb65c7d37d..70e47fdec8d33 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/Encryption.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsEncryption.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Maps.Models { /// (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. - public partial class Encryption + public partial class MapsEncryption { /// /// Keeps track of any properties unknown to the library. @@ -45,16 +45,16 @@ public partial class Encryption /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public Encryption() + /// Initializes a new instance of . + public MapsEncryption() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Values are enabled and disabled. /// All Customer-managed key encryption properties for the resource. /// Keeps track of any properties unknown to the library. - internal Encryption(InfrastructureEncryption? infrastructureEncryption, CustomerManagedKeyEncryption customerManagedKeyEncryption, IDictionary serializedAdditionalRawData) + internal MapsEncryption(MapsInfrastructureEncryption? infrastructureEncryption, CustomerManagedKeyEncryption customerManagedKeyEncryption, IDictionary serializedAdditionalRawData) { InfrastructureEncryption = infrastructureEncryption; CustomerManagedKeyEncryption = customerManagedKeyEncryption; @@ -62,7 +62,7 @@ internal Encryption(InfrastructureEncryption? infrastructureEncryption, Customer } /// Values are enabled and disabled. - public InfrastructureEncryption? InfrastructureEncryption { get; set; } + public MapsInfrastructureEncryption? InfrastructureEncryption { get; set; } /// All Customer-managed key encryption properties for the resource. public CustomerManagedKeyEncryption CustomerManagedKeyEncryption { get; set; } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/IdentityType.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsIdentityType.cs similarity index 51% rename from sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/IdentityType.cs rename to sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsIdentityType.cs index b133bcb6c3523..36c138d24eff8 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/IdentityType.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsIdentityType.cs @@ -11,13 +11,13 @@ namespace Azure.ResourceManager.Maps.Models { /// Values can be systemAssignedIdentity or userAssignedIdentity. - public readonly partial struct IdentityType : IEquatable + public readonly partial struct MapsIdentityType : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public IdentityType(string value) + public MapsIdentityType(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -27,23 +27,23 @@ public IdentityType(string value) private const string DelegatedResourceIdentityValue = "delegatedResourceIdentity"; /// systemAssignedIdentity. - public static IdentityType SystemAssignedIdentity { get; } = new IdentityType(SystemAssignedIdentityValue); + public static MapsIdentityType SystemAssignedIdentity { get; } = new MapsIdentityType(SystemAssignedIdentityValue); /// userAssignedIdentity. - public static IdentityType UserAssignedIdentity { get; } = new IdentityType(UserAssignedIdentityValue); + public static MapsIdentityType UserAssignedIdentity { get; } = new MapsIdentityType(UserAssignedIdentityValue); /// delegatedResourceIdentity. - public static IdentityType DelegatedResourceIdentity { get; } = new IdentityType(DelegatedResourceIdentityValue); - /// Determines if two values are the same. - public static bool operator ==(IdentityType left, IdentityType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IdentityType left, IdentityType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator IdentityType(string value) => new IdentityType(value); + public static MapsIdentityType DelegatedResourceIdentity { get; } = new MapsIdentityType(DelegatedResourceIdentityValue); + /// Determines if two values are the same. + public static bool operator ==(MapsIdentityType left, MapsIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MapsIdentityType left, MapsIdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MapsIdentityType(string value) => new MapsIdentityType(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IdentityType other && Equals(other); + public override bool Equals(object obj) => obj is MapsIdentityType other && Equals(other); /// - public bool Equals(IdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(MapsIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsInfrastructureEncryption.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsInfrastructureEncryption.cs new file mode 100644 index 0000000000000..436d3c192b4c4 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsInfrastructureEncryption.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Maps.Models +{ + /// Values are enabled and disabled. + public readonly partial struct MapsInfrastructureEncryption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MapsInfrastructureEncryption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "enabled"; + private const string DisabledValue = "disabled"; + + /// enabled. + public static MapsInfrastructureEncryption Enabled { get; } = new MapsInfrastructureEncryption(EnabledValue); + /// disabled. + public static MapsInfrastructureEncryption Disabled { get; } = new MapsInfrastructureEncryption(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(MapsInfrastructureEncryption left, MapsInfrastructureEncryption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MapsInfrastructureEncryption left, MapsInfrastructureEncryption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MapsInfrastructureEncryption(string value) => new MapsInfrastructureEncryption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MapsInfrastructureEncryption other && Equals(other); + /// + public bool Equals(MapsInfrastructureEncryption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/autorest.md b/sdk/maps/Azure.ResourceManager.Maps/src/autorest.md index a9c5f492198f2..3aa1711784bcc 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/autorest.md +++ b/sdk/maps/Azure.ResourceManager.Maps/src/autorest.md @@ -35,6 +35,9 @@ prepend-rp-prefix: - LinkedResource - SigningKey - CorsRule + - Encryption + - InfrastructureEncryption + - IdentityType format-by-name-rules: 'tenantId': 'uuid' From 78cb4d137e77f4b44b5af42fce15cbe1ba0702ee Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Tue, 19 Nov 2024 17:57:32 +0800 Subject: [PATCH 3/5] Update changelog --- sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md b/sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md index da2313e19b3b8..910114a4b9e01 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md +++ b/sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.1.0-beta.4 (Unreleased) +## 1.1.0 (Unreleased) ### Features Added @@ -9,9 +9,7 @@ ### Breaking Changes -### Bugs Fixed - -### Other Changes +- Upgrade Maps ARM API version to `2023-06-01` ## 1.1.0-beta.3 (2023-11-29) From 7e8e4efac236fff05254e6281cf6d1f0efd60786 Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Tue, 19 Nov 2024 20:08:18 +0800 Subject: [PATCH 4/5] Update .csproj Version tag --- .../src/Azure.ResourceManager.Maps.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Azure.ResourceManager.Maps.csproj b/sdk/maps/Azure.ResourceManager.Maps/src/Azure.ResourceManager.Maps.csproj index 0005876d9d36e..17e4159754bfd 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Azure.ResourceManager.Maps.csproj +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Azure.ResourceManager.Maps.csproj @@ -1,6 +1,6 @@ - 1.1.0-beta.4 + 1.1.0 1.0.1 Azure.ResourceManager.Maps From 59814f52b00cfb7f72845cb77f95255e0bbc6982 Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Mon, 25 Nov 2024 17:21:47 +0800 Subject: [PATCH 5/5] Update changelog --- sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md b/sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md index 910114a4b9e01..aa62735f9c566 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md +++ b/sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md @@ -1,16 +1,13 @@ # Release History -## 1.1.0 (Unreleased) +## 1.1.0 (2024-11-27) ### Features Added +- Upgrade Maps ARM API version to `2023-06-01` - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - Exposed `JsonModelWriteCore` for model serialization procedure. -### Breaking Changes - -- Upgrade Maps ARM API version to `2023-06-01` - ## 1.1.0-beta.3 (2023-11-29) ### Features Added